WordPress.org

Make WordPress Core

Changeset 4116


Ignore:
Timestamp:
08/24/2006 11:50:24 PM (15 years ago)
Author:
ryan
Message:

Add single_cat_title filter. Props ryanscheuermann. fixes #2935

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r3885 r4116  
    150150            // category exclusion
    151151            if ( !stristr($cat,'-') )
    152                 $title = get_the_category_by_ID($cat);
     152                $title = apply_filters('single_cat_title', get_the_category_by_ID($cat));
    153153    }
    154154    if ( !empty($category_name) ) {
     
    161161        }
    162162        $title = $wpdb->get_var("SELECT cat_name FROM $wpdb->categories WHERE category_nicename = '$category_name'");
     163        $title = apply_filters('single_cat_title', $title);
    163164    }
    164165
     
    231232    $cat = intval( get_query_var('cat') );
    232233    if ( !empty($cat) && !(strtoupper($cat) == 'ALL') ) {
    233         $my_cat_name = get_the_category_by_ID($cat);
     234        $my_cat_name = apply_filters('single_cat_title', get_the_category_by_ID($cat));
    234235        if ( !empty($my_cat_name) ) {
    235236            if ( $display )
Note: See TracChangeset for help on using the changeset viewer.