Introduce `most_used` taxonomy label, for text on 'Most Used' metabox tab.

Props mdifelice, jlambe.
Fixes #41150.
Built from https://develop.svn.wordpress.org/trunk@40984


git-svn-id: http://core.svn.wordpress.org/trunk@40834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2017-07-01 14:46:41 +00:00
parent 5fa2de51ef
commit 26fcea496d
3 changed files with 6 additions and 2 deletions

View File

@ -496,7 +496,7 @@ function post_categories_meta_box( $post, $box ) {
<div id="taxonomy-<?php echo $tax_name; ?>" class="categorydiv"> <div id="taxonomy-<?php echo $tax_name; ?>" class="categorydiv">
<ul id="<?php echo $tax_name; ?>-tabs" class="category-tabs"> <ul id="<?php echo $tax_name; ?>-tabs" class="category-tabs">
<li class="tabs"><a href="#<?php echo $tax_name; ?>-all"><?php echo $taxonomy->labels->all_items; ?></a></li> <li class="tabs"><a href="#<?php echo $tax_name; ?>-all"><?php echo $taxonomy->labels->all_items; ?></a></li>
<li class="hide-if-no-js"><a href="#<?php echo $tax_name; ?>-pop"><?php _e( 'Most Used' ); ?></a></li> <li class="hide-if-no-js"><a href="#<?php echo $tax_name; ?>-pop"><?php echo esc_html( $taxonomy->labels->most_used ); ?></a></li>
</ul> </ul>
<div id="<?php echo $tax_name; ?>-pop" class="tabs-panel" style="display: none;"> <div id="<?php echo $tax_name; ?>-pop" class="tabs-panel" style="display: none;">

View File

@ -452,6 +452,7 @@ function unregister_taxonomy( $taxonomy ) {
* @since 3.0.0 * @since 3.0.0
* @since 4.3.0 Added the `no_terms` label. * @since 4.3.0 Added the `no_terms` label.
* @since 4.4.0 Added the `items_list_navigation` and `items_list` labels. * @since 4.4.0 Added the `items_list_navigation` and `items_list` labels.
* @since 4.9.0 Added the `most_used` label.
* *
* @param WP_Taxonomy $tax Taxonomy object. * @param WP_Taxonomy $tax Taxonomy object.
* @return object { * @return object {
@ -486,6 +487,8 @@ function unregister_taxonomy( $taxonomy ) {
* list tables. * list tables.
* @type string $items_list_navigation Label for the table pagination hidden heading. * @type string $items_list_navigation Label for the table pagination hidden heading.
* @type string $items_list Label for the table 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'.
* } * }
*/ */
function get_taxonomy_labels( $tax ) { function get_taxonomy_labels( $tax ) {
@ -517,6 +520,7 @@ function get_taxonomy_labels( $tax ) {
'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ), 'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ),
'items_list_navigation' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ), 'items_list_navigation' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ),
'items_list' => array( __( 'Tags list' ), __( 'Categories list' ) ), 'items_list' => array( __( 'Tags list' ), __( 'Categories list' ) ),
'most_used' => array( null, __( 'Most Used' ) ),
); );
$nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name']; $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9-alpha-40983'; $wp_version = '4.9-alpha-40984';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.