Untitled
By: a guest | Mar 21st, 2010 | Syntax:
PHP | Size: 0.84 KB | Hits: 189 | Expires: Never
function cltc_modify_navigation() {
global $bp;
bp_core_remove_nav_item('settings');
$profile_link = $bp->loggedin_user->domain . $bp->profile->slug . '/';
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() ) );
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() ) );
}
add_action( 'wp', 'cltc_modify_navigation', 50 );
add_action( 'admin_menu', 'cltc_modify_navigation', 50 );