Guest
Public paste!

Untitled

By: a guest | Mar 21st, 2010 | Syntax: PHP | Size: 0.84 KB | Hits: 189 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. function cltc_modify_navigation() {
  2.         global $bp;
  3.  
  4.         bp_core_remove_nav_item('settings');
  5.  
  6.         $profile_link = $bp->loggedin_user->domain . $bp->profile->slug . '/';
  7.  
  8.         bp_core_new_subnav_item( array( 'name' => __( 'General', 'buddypress' ), 'slug' => 'general', 'parent_url' => $profile_link, 'parent_slug' => $bp->profile->slug, 'screen_function' => 'bp_core_screen_general_settings', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) );
  9.         bp_core_new_subnav_item( array( 'name' => __( 'Notifications', 'buddypress' ), 'slug' => 'notifications', 'parent_url' => $profile_link, 'parent_slug' => $bp->profile->slug, 'screen_function' => 'bp_core_screen_notification_settings', 'position' => 40, 'user_has_access' => bp_is_my_profile() ) );
  10.  
  11. }
  12. add_action( 'wp', 'cltc_modify_navigation', 50 );
  13. add_action( 'admin_menu', 'cltc_modify_navigation', 50 );