Make WordPress Core

Ticket #2466: apply list_cats filter consistently part 2.diff

File apply list_cats filter consistently part 2.diff, 800 bytes (added by majelbstoat, 19 years ago)

Does not replace first patch, is in addition to it. Filters single_cat_title().

  • C:/Xampp/htdocs/development/subversion/wordpress/wp-includes/template-functions-general.php

     
    232232function single_cat_title($prefix = '', $display = true ) {
    233233        $cat = intval( get_query_var('cat') );
    234234        if ( !empty($cat) && !(strtoupper($cat) == 'ALL') ) {
    235                 $my_cat_name = get_the_category_by_ID($cat);
     235                $my_cat_name = apply_filters('list_cats', get_the_category_by_ID($cat), $cat);
    236236                if ( !empty($my_cat_name) ) {
    237237                        if ( $display )
    238238                                echo $prefix.strip_tags($my_cat_name);