[wp-trac] Re: [WordPress Trac] #9719: Please : a filter for $category object in get_the_category_list() (was: Please : a filter for $category name in get_the_category_list())

WordPress Trac wp-trac at lists.automattic.com
Tue May 5 17:19:06 GMT 2009


#9719: Please : a filter for $category object in get_the_category_list()
-----------------------------+----------------------------------------------
 Reporter:  michelwppi       |        Owner:  anonymous
     Type:  feature request  |       Status:  reopened 
 Priority:  high             |    Milestone:  2.8      
Component:  General          |      Version:  2.8      
 Severity:  normal           |   Resolution:           
 Keywords:                   |  
-----------------------------+----------------------------------------------
Changes (by michelwppi):

 * cc: michelwppi (added)


Comment:

 this ticket #9227 is much more relevant and adapted to the desired
 functional. Even if wp_list_categories(), a filter exists for each three
 parts of one element (name, link, and description). Here, just with adding
 a line like below, the potentialities of adaption are huge :

 As in classes.php (line 1328), I suggest this adapted modif with a filter
 named post_list_cats for the start of two loops present in
 '''get_the_category_list()''' (line 187 et 209)


 {{{
 foreach ( $categories as $category ) {
 $category = apply_filters( 'post_list_cats', $category);
 }}}

 If, as asked in the cited trac, the echo (display) is added in the
 function '''get_the_category_list()''' (with modif inside the_category), a
 second param 'echo' can be passed in this filter.

 Hope this modif will be implemented soon, to built easy plug and play kit
 to transform automatically a well made theme in a theme for iPhone or a
 multilingual theme (without coding by the bloger).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9719#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list