BP_XProfile_Component::setup_settings_admin_nav( array $wp_admin_nav )

Adds “Settings > Profile” subnav item under the “Settings” adminbar menu.

Description

Parameters

$wp_admin_nav

(Required) The settings adminbar nav array.

Return

(array)

Source

File: bp-xprofile/classes/class-bp-xprofile-component.php

486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
public function setup_settings_admin_nav( $wp_admin_nav ) {
 
    // Setup the logged in user variables.
    $settings_link = trailingslashit( bp_loggedin_user_domain() . bp_get_settings_slug() );
 
    // Add the "Profile" subnav item.
    $wp_admin_nav[] = array(
        'parent' => 'my-account-' . buddypress()->settings->id,
        'id'     => 'my-account-' . buddypress()->settings->id . '-profile',
        'title'  => __( 'Privacy', 'buddyboss' ),
        'href'   => trailingslashit( $settings_link . 'profile' ),
        'position' => 30
    );
 
    return $wp_admin_nav;
}

Changelog

Changelog
Version Description
BuddyPress 2.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.