Make WordPress Core


Ignore:
Timestamp:
10/24/2017 11:21:47 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: After [40984], add the most_used label for non-hierarchical taxonomies too, and use it on the Menus screen.

Props johnbillion.
Fixes #41150.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/nav-menu.php

    r41941 r41987  
    608608    global $nav_menu_selected_id;
    609609    $taxonomy_name = $box['args']->name;
     610    $taxonomy = get_taxonomy( $taxonomy_name );
    610611
    611612    // Paginate browsing for large numbers of objects.
     
    683684            <li <?php echo ( 'most-used' == $current_tab ? ' class="tabs"' : '' ); ?>>
    684685                <a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-pop" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($taxonomy_name . '-tab', 'most-used', remove_query_arg($removed_args))); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-pop">
    685                     <?php _e( 'Most Used' ); ?>
     686                    <?php echo esc_html( $taxonomy->labels->most_used ); ?>
    686687                </a>
    687688            </li>
Note: See TracChangeset for help on using the changeset viewer.