jetpack_social_menu_init

Activate the Social Menu plugin.

Description

jetpack_social_menu_init(); 

Usage

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

Defined (1)

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

/modules/theme-tools/social-menu.php  
  1. function jetpack_social_menu_init() { 
  2. // Only load our code if our theme declares support 
  3. if ( ! current_theme_supports( 'jetpack-social-menu' ) ) { 
  4. return; 
  5.  
  6. /** 
  7. * Social Menu description. 
  8. * Rename the social menu description. 
  9. * @module theme-tools 
  10. * @since 3.9.0 
  11. * @param string $social_menu_description Social Menu description 
  12. */ 
  13. $social_menu_description = apply_filters( 'jetpack_social_menu_description', __( 'Social Menu', 'jetpack' ) ); 
  14.  
  15. // Register a new menu location 
  16. register_nav_menus( array( 
  17. 'jetpack-social-menu' => esc_html( $social_menu_description ),  
  18. ) ); 
  19.  
  20. // Enqueue CSS 
  21. add_action( 'wp_enqueue_scripts', 'jetpack_social_menu_style' ); 
  22.  
  23. // Load SVG icons related functions and filters 
  24. if ( 'svg' === jetpack_social_menu_get_type() ) { 
  25. require( dirname( __FILE__ ) . '/social-menu/icon-functions.php' );