From e5e17a4effedb6fcd4480c3f5e49fd9c5a61be77 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 27 Sep 2017 14:38:40 +0000 Subject: [PATCH] Taxonomy: Introduce a `back_to_items` taxonomy label. This is used after updating a taxonomy term in the link to return to the term listing screen. Props benoitchantre Fixes #41898 git-svn-id: https://develop.svn.wordpress.org/trunk@41618 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-tag-form.php | 3 +-- src/wp-includes/taxonomy.php | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/edit-tag-form.php b/src/wp-admin/edit-tag-form.php index d68aa1e507..81e62a60fc 100644 --- a/src/wp-admin/edit-tag-form.php +++ b/src/wp-admin/edit-tag-form.php @@ -75,8 +75,7 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>

labels->name ); + echo esc_html( $tax->labels->back_to_items ); ?>

diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 87fe0eb657..10f26d59ff 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -120,6 +120,7 @@ function create_initial_taxonomies() { 'separate_items_with_commas' => null, 'add_or_remove_items' => null, 'choose_from_most_used' => null, + 'back_to_items' => __( '← Back to Link Categories' ), ), 'capabilities' => array( 'manage_terms' => 'manage_links', @@ -452,7 +453,7 @@ function unregister_taxonomy( $taxonomy ) { * @since 3.0.0 * @since 4.3.0 Added the `no_terms` label. * @since 4.4.0 Added the `items_list_navigation` and `items_list` labels. - * @since 4.9.0 Added the `most_used` label. + * @since 4.9.0 Added the `most_used` and `back_to_items` labels. * * @param WP_Taxonomy $tax Taxonomy object. * @return object { @@ -489,6 +490,7 @@ function unregister_taxonomy( $taxonomy ) { * @type string $items_list Label for the table hidden heading. * @type string $most_used Title used for the Most Used panel. Not used for non-hierarchical * taxonomies. Default 'Most Used'. + * @type string $back_to_items Label displayed after a term has been updated. * } */ function get_taxonomy_labels( $tax ) { @@ -521,6 +523,7 @@ function get_taxonomy_labels( $tax ) { 'items_list_navigation' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ), 'items_list' => array( __( 'Tags list' ), __( 'Categories list' ) ), 'most_used' => array( null, __( 'Most Used' ) ), + 'back_to_items' => array( __( '← Back to Tags' ), __( '← Back to Categories' ) ), ); $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];