jetpack_social_menu

Create the function for the menu.

Description

jetpack_social_menu(); 

Usage

  1. if ( !function_exists( 'jetpack_social_menu' ) ) { 
  2. require_once '/modules/theme-tools/social-menu.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_social_menu(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/theme-tools/social-menu.php  
  1. function jetpack_social_menu() { 
  2. if ( has_nav_menu( 'jetpack-social-menu' ) ) : 
  3. $menu_type = jetpack_social_menu_get_type(); 
  4. $link_after = '</span>'; 
  5.  
  6. if ( 'svg' === $menu_type ) { 
  7. $link_after .= jetpack_social_menu_get_svg( array( 'icon' => 'chain' ) ); 
  8. } ?> 
  9. <nav class="jetpack-social-navigation jetpack-social-navigation-<?php echo esc_attr( $menu_type ); ?>" role="navigation" aria-label="<?php esc_html_e( 'Social Links Menu', 'jetpack' ); ?>"> 
  10. <?php 
  11. wp_nav_menu( array( 
  12. 'theme_location' => 'jetpack-social-menu',  
  13. 'link_before' => '<span class="screen-reader-text">',  
  14. 'link_after' => $link_after,  
  15. 'depth' => 1,  
  16. ) ); 
  17. ?> 
  18. </nav><!-- .jetpack-social-navigation --> 
  19. <?php endif;