Changeset 3653
- Timestamp:
- 01/04/2011 07:10:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/functions.php
r3631 r3653 474 474 * Used when the custom menus haven't been configured. 475 475 * 476 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 476 477 * @param array Menu arguments from wp_nav_menu() 477 * @package BuddyPress Theme478 478 * @see wp_nav_menu() 479 479 * @since 1.3 … … 483 483 484 484 $pages_args = array( 485 'title_li' => '', 486 'depth' => '0', 487 'exclude' => bp_dtheme_page_on_front() 485 'depth' => 0, 486 'echo' => false, 487 'exclude' => '', 488 'title_li' => '' 488 489 ); 489 490 … … 494 495 $pages_args['exclude'] .= $bp->pages->forums->id; 495 496 } 496 ?> 497 <ul id="nav"> 498 <li<?php if ( is_front_page() ) : ?> class="selected"<?php endif; ?>> 499 <a href="<?php echo home_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a> 500 </li> 501 502 <?php wp_list_pages( $pages_args ) ?> 503 <?php do_action( 'bp_nav_items' ) ?> 504 </ul><!-- #nav --> 505 <?php 497 498 $menu = wp_page_menu( $pages_args ); 499 $menu = str_replace( array( '<div class="menu"><ul>', '</ul></div>' ), array( '<ul id="nav">', '</ul><!-- #nav -->' ), $menu ); 500 echo $menu; 501 502 do_action( 'bp_nav_items' ); 506 503 } 507 504 endif; 505 506 /** 507 * Get our wp_nav_menu() fallback, bp_dtheme_main_nav(), to show a home link. 508 * 509 * @param array $args Default values for wp_page_menu() 510 * @see wp_page_menu() 511 * @since 1.3 512 */ 513 function bp_dtheme_page_menu_args( $args ) { 514 $args['show_home'] = true; 515 return $args; 516 } 517 add_filter( 'wp_page_menu_args', 'bp_dtheme_page_menu_args' ); 508 518 509 519 /**
Note: See TracChangeset
for help on using the changeset viewer.