diff options
author | patdenice <patdenice@piwigo.org> | 2008-07-12 14:27:22 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2008-07-12 14:27:22 +0000 |
commit | 3e8dd7da9b095d6e9a5ba69515cbeb075fc214b6 (patch) | |
tree | 277bda41e6d424a0995cba5a01648776b24cf398 /include/functions_html.inc.php | |
parent | be7bb150c2157948cc6e00324166059d03b14e16 (diff) |
Add triggers for category name (render_category_name).
Add strip_tags for ALT attribute on category thumbnail.
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2432 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_html.inc.php')
-rw-r--r-- | include/functions_html.inc.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index d8bdb833c..104f8a6ef 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -247,6 +247,13 @@ function get_cat_display_name($cat_informations, is_array($cat) or trigger_error( 'get_cat_display_name wrong type for category ', E_USER_WARNING ); + + $cat['name'] = trigger_event( + 'render_category_name', + $cat['name'], + 'get_cat_display_name' + ); + if ($is_first) { $is_first = false; @@ -321,6 +328,12 @@ SELECT id, name, permalink { $cat = $cache['cat_names'][$category_id]; + $cat['name'] = trigger_event( + 'render_category_name', + $cat['name'], + 'get_cat_display_name_cache' + ); + if ($is_first) { $is_first = false; @@ -433,7 +446,13 @@ function get_html_menu_category($categories, $selected_category) { $menu.= ' rel="up"'; } - $menu.= ' title="'.$title.'">'.$category['name'].'</a>'; + $menu.= ' title="'.$title.'">'; + $menu.= trigger_event( + 'render_category_name', + $category['name'], + 'get_html_menu_category' + ); + $menu.= '</a>'; if ( $category['count_images']>0 ) {// at least one direct or indirect image |