- <tr class="form-field">
- <th scope="row" valign="top"><label for="description"><?php _e('Description') ?></label></th>
- <td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo esc_html($tag->description); ?></textarea><br />
- <span class="description"><?php _e('The description is not prominent by default, however some themes may show it.'); ?></span></td>
+<?php } ?>
+<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
+ <tr class="form-field term-parent-wrap">
+ <th scope="row"><label for="parent"><?php _ex( 'Parent', 'term parent' ); ?></label></th>
+ <td>
+ <?php
+ $dropdown_args = array(
+ 'hide_empty' => 0,
+ 'hide_if_empty' => false,
+ 'taxonomy' => $taxonomy,
+ 'name' => 'parent',
+ 'orderby' => 'name',
+ 'selected' => $tag->parent,
+ 'exclude_tree' => $tag->term_id,
+ 'hierarchical' => true,
+ 'show_option_none' => __( 'None' ),
+ );
+
+ /** This filter is documented in wp-admin/edit-tags.php */
+ $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'edit' );
+ wp_dropdown_categories( $dropdown_args ); ?>
+ <?php if ( 'category' == $taxonomy ) : ?>
+ <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>
+ <?php endif; ?>
+ </td>
+ </tr>
+<?php endif; // is_taxonomy_hierarchical() ?>
+ <tr class="form-field term-description-wrap">
+ <th scope="row"><label for="description"><?php _e( 'Description' ); ?></label></th>
+ <td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea>
+ <p class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p></td>