[wp-trac] [WordPress Trac] #18166: Be able to amend the parent dropdown on the edit taxonomy term page

WordPress Trac noreply at wordpress.org
Mon Aug 26 17:18:48 UTC 2013


#18166: Be able to amend the parent dropdown on the edit taxonomy term page
-------------------------+--------------------
 Reporter:  leewillis77  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.7
Component:  Taxonomy     |     Version:  3.2.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+--------------------

Comment (by DrewAPicture):

 Replying to [comment:11 nacin]:
 > We can probably clean this up a bit, stylistically — break this out into
 a few lines of code.

 Something like this?
 {{{
 #!php
 <?php
 if ( is_taxonomy_hierarchical( $taxonomy ) ) :
 $dropdown_args = array(
         'hide_empty'       => 0,
         'hide_if_empty'    => false,
         'taxonomy'         => $taxonomy,
         'name'             => 'parent',
         'orderby'          => 'name',
         'hierarchical'     => true,
         'show_option_none' => __( 'None' )
 );
 ?>
 <div class="form-field">
         <label for="parent"><?php _ex('Parent', 'Taxonomy Parent');
 ?></label>
         <?php wp_dropdown_categories( apply_filters (
 'taxonomy_parent_dropdown_args', $dropdown_args ), $taxonomy ); ?>
 }}}

 Not sure I follow forcing `'taxonomy' => $taxonomy` after the filter.

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


More information about the wp-trac mailing list