[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentytwentyone/template-parts/header/ -> site-nav.php (source)

   1  <?php
   2  /**
   3   * Displays the site navigation.
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Twenty_One
   7   * @since Twenty Twenty-One 1.0
   8   */
   9  
  10  ?>
  11  
  12  <?php if ( has_nav_menu( 'primary' ) ) : ?>
  13      <nav id="site-navigation" class="primary-navigation" aria-label="<?php esc_attr_e( 'Primary menu', 'twentytwentyone' ); ?>">
  14          <div class="menu-button-container">
  15              <button id="primary-mobile-menu" class="button" aria-controls="primary-menu-list" aria-expanded="false">
  16                  <span class="dropdown-icon open"><?php esc_html_e( 'Menu', 'twentytwentyone' ); ?>
  17                      <?php echo twenty_twenty_one_get_icon_svg( 'ui', 'menu' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
  18                  </span>
  19                  <span class="dropdown-icon close"><?php esc_html_e( 'Close', 'twentytwentyone' ); ?>
  20                      <?php echo twenty_twenty_one_get_icon_svg( 'ui', 'close' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
  21                  </span>
  22              </button><!-- #primary-mobile-menu -->
  23          </div><!-- .menu-button-container -->
  24          <?php
  25          wp_nav_menu(
  26              array(
  27                  'theme_location'  => 'primary',
  28                  'menu_class'      => 'menu-wrapper',
  29                  'container_class' => 'primary-menu-container',
  30                  'items_wrap'      => '<ul id="primary-menu-list" class="%2$s">%3$s</ul>',
  31                  'fallback_cb'     => false,
  32              )
  33          );
  34          ?>
  35      </nav><!-- #site-navigation -->
  36      <?php
  37  endif;


Generated : Thu Mar 28 08:20:01 2024 Cross-referenced by PHPXref