Taxonomy: Add an explanation for "Parent" dropdown for hierarchical custom taxonomies.

Props F J Kaiser, raggedrobins, DrewAPicture, diddledan, SergeyBiryukov.
Fixes #23447.

git-svn-id: https://develop.svn.wordpress.org/trunk@39895 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2017-01-13 04:18:16 +00:00
parent 040362a5e0
commit ce89e8dd48
2 changed files with 7 additions and 3 deletions

View File

@ -165,7 +165,9 @@ do_action( "{$taxonomy}_term_edit_form_top", $tag, $taxonomy );
$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>
<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 else : ?>
<p class="description"><?php _e( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' ); ?></p>
<?php endif; ?>
</td>
</tr>

View File

@ -436,8 +436,10 @@ do_action( "{$taxonomy}_term_new_form_tag" );
wp_dropdown_categories( $dropdown_args );
?>
<?php if ( 'category' == $taxonomy ) : // @todo: Generic text for hierarchical taxonomies ?>
<p><?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 if ( 'category' == $taxonomy ) : ?>
<p><?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 else : ?>
<p><?php _e( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' ); ?></p>
<?php endif; ?>
</div>
<?php endif; // is_taxonomy_hierarchical() ?>