From 37c02eb5feb9e18ea82501ebb142071ef06ca742 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Wed, 10 Nov 2021 00:46:00 +0000 Subject: [PATCH] Taxonomy: Change some static strings to registration labels. Add additional label options to `register_taxonomy()` to allow developers further flexibility for customizing the edit taxonomy screen. Props mclaurent, swissspidy, johnbillion, jeremyescott, theMikeD, jeremyfelt, dontgo2sleep, SergeyBiryukov, audrasjb, Boniu91. Fixes #43060. Built from https://develop.svn.wordpress.org/trunk@52094 git-svn-id: http://core.svn.wordpress.org/trunk@51686 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tag-form.php | 8 ++++---- wp-admin/edit-tags.php | 8 ++++---- wp-includes/taxonomy.php | 4 ++++ wp-includes/version.php | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index 3752b8f52c..0c6e1994b9 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; ?>

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

+

labels->slug_description; ?>

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

-

+

labels->parent_description; ?>

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

+

labels->description_description; ?>

-

+

labels->name_description; ?>

-

+

labels->slug_description; ?>

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

-

+

labels->parent_description; ?>

-

+

labels->description_description; ?>

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.' ) ), '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 6443244414..c8311a2f1e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52093'; +$wp_version = '5.9-alpha-52094'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.