Ticket #29853: 29853.diff
File 29853.diff, 2.5 KB (added by , 10 years ago) |
---|
-
edit-tag-form.php
105 105 <tr class="form-field term-parent-wrap"> 106 106 <th scope="row"><label for="parent"><?php _ex( 'Parent', 'term parent' ); ?></label></th> 107 107 <td> 108 <?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?> 108 <?php 109 $dropdown_args = array( 110 'hide_empty' => 0, 111 'hide_if_empty' => false, 112 'name' => 'parent', 113 'orderby' => 'name', 114 'taxonomy' => $taxonomy, 115 'selected' => $tag->parent, 116 'exclude_tree' => $tag->term_id, 117 'hierarchical' => true, 118 'show_option_none' => __('None') 119 ); 120 121 /** This filter is documented in wp-admin/edit-tags.php */ 122 $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'edit-term' ); 123 wp_dropdown_categories( $dropdown_args ); ?> 109 124 <?php if ( 'category' == $taxonomy ) : ?> 110 125 <p class="description"><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p> 111 126 <?php endif; ?> -
edit-tags.php
477 477 * Filter the taxonomy parent drop-down on the Edit Term page. 478 478 * 479 479 * @since 3.7.0 480 * @since 4.1.0 Added $context parameter. 480 481 * 481 482 * @param array $dropdown_args { 482 483 * An array of taxonomy parent drop-down arguments. … … 491 492 * @type string $show_option_none Label to display if there are no terms. Default 'None'. 492 493 * } 493 494 * @param string $taxonomy The taxonomy slug. 495 * @param string $context Filter context. Possible values (new-term|edit-term) 494 496 */ 495 $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy );497 $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new-term' ); 496 498 wp_dropdown_categories( $dropdown_args ); 497 499 ?> 498 500 <?php if ( 'category' == $taxonomy ) : // @todo: Generic text for hierarchical taxonomies ?>