onetone_get_topbar_content

The Onetone onetone get topbar content function.

Description

onetone_get_topbar_content( (string) $type = '' ); 

Parameters (1)

0. $type — Optional. (string) => ''
The type.

Usage

  1. if ( !function_exists( 'onetone_get_topbar_content' ) ) { 
  2. require_once '/includes/theme-functions.php'; 
  3.  
  4. // The type. 
  5. $type = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = onetone_get_topbar_content($type); 
  9.  

Defined (1)

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

/includes/theme-functions.php  
  1. function onetone_get_topbar_content( $type ='') { 
  2.  
  3. switch( $type ) { 
  4. case "info": 
  5. echo '<div class="top-bar-info">'; 
  6. echo onetone_option('top_bar_info_content'); 
  7. echo '</div>'; 
  8. break; 
  9. case "sns": 
  10. $tooltip_position = onetone_option('top_social_tooltip_position', 'bottom');  
  11. echo onetone_get_social('header', 'top-bar-sns', $tooltip_position); 
  12. break; 
  13. case "menu": 
  14. echo '<nav class="top-bar-menu">'; 
  15. wp_nav_menu(array('theme_location'=>'top_bar_menu', 'depth'=>1, 'fallback_cb' =>false, 'container'=>'', 'container_class'=>'', 'menu_id'=>'', 'menu_class'=>'', 'link_before' => '<span>', 'link_after' => '</span>', 'items_wrap'=> '<ul id="%1$s" class="%2$s">%3$s</ul>')); 
  16. echo '</nav>'; 
  17. break; 
  18. case "none": 
  19.  
  20. break;