[wp-trac] [WordPress Trac] #15222: show_option_all_included for wp_dropdown_categories

WordPress Trac wp-trac at lists.automattic.com
Tue Oct 26 12:50:15 UTC 2010


#15222: show_option_all_included for wp_dropdown_categories
-------------------------+--------------------------------------------------
 Reporter:  roxaz        |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  3.0.1          
 Severity:  normal       |    Keywords:                 
-------------------------+--------------------------------------------------
 this little addition lets user have an option which allows searching in
 all categories included in dropdown only. put it below handling of
 show_option_all option in wp_dropdown_categories


                 if($show_option_all_included)
                 {
                         $show_option_all = apply_filters( 'list_cats',
 $show_option_all_included );
                         $selected = ( '0' === strval($r['selected']) ) ? "
 selected='selected'" : '';
                         $vals = '';
                         foreach($categories as $cat)
                                 $vals .= $cat->term_id.',';
                         $vals = substr($vals, 0, -1);
                         $output .= "\t<option
 value='$vals'$selected>$show_option_all</option>\n";
                 }

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15222>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list