Changeset 2433 for trunk/include


Ignore:
Timestamp:
Jul 12, 2008, 4:57:24 PM (16 years ago)
Author:
patdenice
Message:

Merge from branch-1_7 (r2432).

Add triggers for category name (render_category_name).
Add strip_tags for ALT attribute on category thumbnail.

Location:
trunk/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/category_cats.inc.php

    r2424 r2433  
    225225  foreach ($categories as $category)
    226226  {
     227    $category['name'] = trigger_event(
     228        'render_category_name',
     229        $category['name'],
     230        'subcatify_category_name'
     231        );
     232
    227233    if ($page['section']=='recent_cats')
    228234    {
     
    240246          'ID'    => $category['id'],
    241247          'TN_SRC'   => $thumbnail_src_of[$category['representative_picture_id']],
    242           'ALT'   => $category['name'],
     248          'ALT'   => strip_tags($category['name']),
    243249          'ICON'  => $icon_ts,
    244250
  • trunk/include/functions_category.inc.php

    r2356 r2433  
    289289      $option = str_repeat(' ',
    290290                           (3 * substr_count($category['global_rank'], '.')));
    291       $option.= '- '.$category['name'];
     291      $option.= '- ';
     292      $option.= strip_tags(
     293        trigger_event(
     294          'render_category_name',
     295          $category['name'],
     296          'display_select_categories'
     297          )
     298        );
    292299    }
    293300    $tpl_cats[ $category['id'] ] = $option;
  • trunk/include/functions_html.inc.php

    r2409 r2433  
    247247        'get_cat_display_name wrong type for category ', E_USER_WARNING
    248248      );
     249
     250    $cat['name'] = trigger_event(
     251      'render_category_name',
     252      $cat['name'],
     253      'get_cat_display_name'
     254      );
     255
    249256    if ($is_first)
    250257    {
     
    321328    $cat = $cache['cat_names'][$category_id];
    322329
     330    $cat['name'] = trigger_event(
     331      'render_category_name',
     332      $cat['name'],
     333      'get_cat_display_name_cache'
     334      );
     335
    323336    if ($is_first)
    324337    {
     
    431444      $menu.= ' rel="up"';
    432445    }
    433     $menu.= ' title="'.$title.'">'.$category['name'].'</a>';
     446    $menu.= ' title="'.$title.'">';
     447    $menu.= trigger_event(
     448      'render_category_name',
     449      $category['name'],
     450      'get_html_menu_category'
     451      );
     452    $menu.= '</a>';
    434453
    435454    if ( $category['count_images']>0 )
Note: See TracChangeset for help on using the changeset viewer.