From eac206b375e3396464df88972a0a96e99dd773c4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 24 Oct 2017 11:21:47 +0000 Subject: [PATCH] Taxonomy: After [40984], add the `most_used` label for non-hierarchical taxonomies too, and use it on the Menus screen. Props johnbillion. Fixes #41150. git-svn-id: https://develop.svn.wordpress.org/trunk@41987 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/meta-boxes.php | 2 +- src/wp-admin/includes/nav-menu.php | 3 ++- src/wp-includes/taxonomy.php | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index 6aeb0701f3..17490314ed 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -998,7 +998,7 @@ function link_categories_meta_box($link) {
diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index d1fa9507cd..d6acfcaf3c 100644 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -607,6 +607,7 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) { function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { global $nav_menu_selected_id; $taxonomy_name = $box['args']->name; + $taxonomy = get_taxonomy( $taxonomy_name ); // Paginate browsing for large numbers of objects. $per_page = 50; @@ -682,7 +683,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
  • > - + labels->most_used ); ?>
  • > diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 6313641d14..92a4ee73d2 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -488,8 +488,7 @@ function unregister_taxonomy( $taxonomy ) { * list tables. * @type string $items_list_navigation Label for the table pagination hidden heading. * @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 $most_used Title for the Most Used tab. Default 'Most Used'. * @type string $back_to_items Label displayed after a term has been updated. * } */ @@ -523,7 +522,7 @@ function get_taxonomy_labels( $tax ) { 'items_list_navigation' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ), 'items_list' => array( __( 'Tags list' ), __( 'Categories list' ) ), /* translators: Tab heading when selecting from the most used terms */ - 'most_used' => array( null, _x( 'Most Used', 'Most used categories' ) ), + 'most_used' => array( _x( 'Most Used', 'tags' ), _x( 'Most Used', 'categories' ) ), 'back_to_items' => array( __( '← Back to Tags' ), __( '← Back to Categories' ) ), ); $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];