bp_dtheme_main_nav

Wp_nav_menu() callback from the main navigation in header.php.

Description

bp_dtheme_main_nav( (array) $args ); 

Used when the custom menus haven't been configured.

Parameters (1)

0. $args (array)
Menu arguments from wp_nav_menu()

Usage

  1. if ( !function_exists( 'bp_dtheme_main_nav' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-themes/bp-default/functions.php'; 
  3.  
  4. // Menu arguments from wp_nav_menu() 
  5. $args = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_dtheme_main_nav($args); 
  9.  

Defined (1)

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

/bp-themes/bp-default/functions.php  
  1. function bp_dtheme_main_nav( $args ) { 
  2. $pages_args = array( 
  3. 'depth' => 0,  
  4. 'echo' => false,  
  5. 'exclude' => '',  
  6. 'title_li' => '' 
  7. ); 
  8. $menu = wp_page_menu( $pages_args ); 
  9. $menu = str_replace( array( '<div class="menu"><ul>', '</ul></div>' ), array( '<ul id="nav">', '</ul><!-- #nav -->' ), $menu ); 
  10. echo $menu; 
  11.