From 654386a5b7699a3f54ce165ff140c4ed56cae308 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 24 Oct 2017 11:23:24 +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. Built from https://develop.svn.wordpress.org/trunk@41987 git-svn-id: http://core.svn.wordpress.org/trunk@41821 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/meta-boxes.php | 2 +- wp-admin/includes/nav-menu.php | 3 ++- wp-includes/taxonomy.php | 5 ++--- wp-includes/version.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 6aeb0701f3..17490314ed 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -998,7 +998,7 @@ function link_categories_meta_box($link) {
diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index d1fa9507cd..d6acfcaf3c 100644 --- a/wp-admin/includes/nav-menu.php +++ b/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/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 6313641d14..92a4ee73d2 100644 --- a/wp-includes/taxonomy.php +++ b/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']; diff --git a/wp-includes/version.php b/wp-includes/version.php index f92395477f..ba072a474b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-beta3-41986'; +$wp_version = '4.9-beta3-41987'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.