From 9ac09f5a673aa10531df714640fd6fd9ef220d11 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 15 Nov 2021 16:45:01 +0000 Subject: [PATCH] Taxonomy: Clarify the taxonomy labels for customizing the field descriptions on Edit Tags screen: * Update the label names to make it clear that these descriptions are not for the term name or slug itself, but for the Name, Slug, Parent, and Description fields: * `name_field_description` * `slug_field_description` * `parent_field_description` * `desc_field_description` * Update the array structure to make it clear that the default values for these labels are the same for both hierarchical and non-hierarchical taxonomies, with the exception of `parent_field_description`. * Add documentation and a `@since` note for the new labels. Follow-up to [52094]. Fixes #43060. Built from https://develop.svn.wordpress.org/trunk@52163 git-svn-id: http://core.svn.wordpress.org/trunk@51755 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tag-form.php | 8 ++++---- wp-admin/edit-tags.php | 8 ++++---- wp-includes/taxonomy.php | 28 ++++++++++++++++++++++++---- wp-includes/version.php | 2 +- 4 files changed, 33 insertions(+), 13 deletions(-) diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index 0c6e1994b9..d0d8f4af5e 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -146,7 +146,7 @@ if ( isset( $tag->name ) ) { -

labels->name_description; ?>

+

labels->name_field_description; ?>

@@ -168,7 +168,7 @@ if ( isset( $tag->name ) ) { $slug = isset( $tag->slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : ''; ?> -

labels->slug_description; ?>

+

labels->slug_field_description; ?>

@@ -195,7 +195,7 @@ if ( isset( $tag->name ) ) {

-

labels->parent_description; ?>

+

labels->parent_field_description; ?>

@@ -203,7 +203,7 @@ if ( isset( $tag->name ) ) { -

labels->description_description; ?>

+

labels->desc_field_description; ?>

-

labels->name_description; ?>

+

labels->name_field_description; ?>

-

labels->slug_description; ?>

+

labels->slug_field_description; ?>

@@ -505,14 +505,14 @@ if ( $can_edit_terms ) {

-

labels->parent_description; ?>

+

labels->parent_field_description; ?>

-

labels->description_description; ?>

+

labels->desc_field_description; ?>

labels['not_found'] = $tax->no_tagcloud; } + $name_field_description = __( 'The name is how it appears on your site.' ); + $slug_field_description = __( 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ); + $parent_field_description = __( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' ); + $desc_field_description = __( 'The description is not prominent by default; however, some themes may show it.' ); + $nohier_vs_hier_defaults = array( 'name' => array( _x( 'Tags', 'taxonomy general name' ), _x( 'Categories', 'taxonomy general name' ) ), - 'name_description' => array( __( 'The name is how it appears on your site.' ), __( 'The name is how it appears on your site.' ) ), 'singular_name' => array( _x( 'Tag', 'taxonomy singular name' ), _x( 'Category', 'taxonomy singular name' ) ), 'search_items' => array( __( 'Search Tags' ), __( 'Search Categories' ) ), 'popular_items' => array( __( 'Popular Tags' ), null ), 'all_items' => array( __( 'All Tags' ), __( 'All Categories' ) ), 'parent_item' => array( null, __( 'Parent Category' ) ), 'parent_item_colon' => array( null, __( 'Parent Category:' ) ), - 'parent_description' => array( null, __( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' ) ), - 'slug_description' => array( __( 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ), __( 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) ), - 'description_description' => array( __( 'The description is not prominent by default; however, some themes may show it.' ), __( 'The description is not prominent by default; however, some themes may show it.' ) ), + 'name_field_description' => array( $name_field_description, $name_field_description ), + 'slug_field_description' => array( $slug_field_description, $slug_field_description ), + 'parent_field_description' => array( null, $parent_field_description ), + 'desc_field_description' => array( $desc_field_description, $desc_field_description ), 'edit_item' => array( __( 'Edit Tag' ), __( 'Edit Category' ) ), 'view_item' => array( __( 'View Tag' ), __( 'View Category' ) ), 'update_item' => array( __( 'Update Tag' ), __( 'Update Category' ) ), diff --git a/wp-includes/version.php b/wp-includes/version.php index b7dc1384b9..7a54961c41 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52162'; +$wp_version = '5.9-alpha-52163'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.