Making WordPress.org

Changeset 8747


Ignore:
Timestamp:
05/08/2019 04:30:48 PM (3 years ago)
Author:
vedjain
Message:

WC Campsite2017: Use menu names to make it more useful for visitors

Earlier, on mobile, menus were labelled by their positions, i.e. Primary or Secondary, which does not really makes sense for a visitor.
This patch uses the actual menu names to label a menu, so that organizers can come up with names that makes most sense depending upon content, for egs, Socials, Pages etc.

fixes #3598
props ryelle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/campsite-2017/header.php

    r5536 r8747  
    2828                <nav id="header-navigation" class="secondary-navigation page-navigation-container" role="navigation">
    2929                    <button class="menu-toggle" aria-controls="secondary-menu" aria-expanded="false">
    30                         <?php esc_html_e( 'Secondary Menu', 'wordcamporg' ); ?>
     30                        <?php echo esc_html( wp_get_nav_menu_name( 'secondary' ) ); ?>
    3131                    </button>
    3232
     
    4242            <nav id="site-navigation" class="main-navigation page-navigation-container" role="navigation">
    4343                <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
    44                     <?php esc_html_e( 'Primary Menu', 'wordcamporg' ); ?>
     44                    <?php echo esc_html( wp_get_nav_menu_name( 'primary' ) ); ?>
    4545                </button>
    4646
Note: See TracChangeset for help on using the changeset viewer.