Make WordPress Core

Ticket #41150: 41150.1.diff

File 41150.1.diff, 2.2 KB (added by mdifelice, 8 years ago)

Added documentation.

  • src/wp-admin/includes/meta-boxes.php

     
    496496        <div id="taxonomy-<?php echo $tax_name; ?>" class="categorydiv">
    497497                <ul id="<?php echo $tax_name; ?>-tabs" class="category-tabs">
    498498                        <li class="tabs"><a href="#<?php echo $tax_name; ?>-all"><?php echo $taxonomy->labels->all_items; ?></a></li>
    499                         <li class="hide-if-no-js"><a href="#<?php echo $tax_name; ?>-pop"><?php _e( 'Most Used' ); ?></a></li>
     499                        <li class="hide-if-no-js"><a href="#<?php echo $tax_name; ?>-pop"><?php echo esc_html( $taxonomy->labels->most_used ); ?></a></li>
    500500                </ul>
    501501
    502502                <div id="<?php echo $tax_name; ?>-pop" class="tabs-panel" style="display: none;">
  • src/wp-includes/taxonomy.php

     
    470470 * - no_terms - Default is "No tags"/"No categories", used in the posts and media list tables.
    471471 * - items_list_navigation - String for the table pagination hidden heading.
    472472 * - items_list - String for the table hidden heading.
     473 * - most_used - Title for the most used panel. Not used for non-hierarchical taxonomies. Default is "Most Used".
    473474 *
    474475 * Above, the first default value is for non-hierarchical taxonomies (like tags) and the second one is for hierarchical taxonomies (like categories).
    475476 *
     
    478479 * @since 3.0.0
    479480 * @since 4.3.0 Added the `no_terms` label.
    480481 * @since 4.4.0 Added the `items_list_navigation` and `items_list` labels.
     482 * @since x.y.z Added the `most_used` label.
    481483 *
    482484 * @param WP_Taxonomy $tax Taxonomy object.
    483485 * @return object object with all the labels as member variables.
     
    511513                'no_terms' => array( __( 'No tags' ), __( 'No categories' ) ),
    512514                'items_list_navigation' => array( __( 'Tags list navigation' ), __( 'Categories list navigation' ) ),
    513515                'items_list' => array( __( 'Tags list' ), __( 'Categories list' ) ),
     516                'most_used' => array( null, __( 'Most Used' ) ),
    514517        );
    515518        $nohier_vs_hier_defaults['menu_name'] = $nohier_vs_hier_defaults['name'];
    516519