BP_XProfile_Component::setup_settings_admin_nav( array $wp_admin_nav )

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


Description Description


Parameters Parameters

$wp_admin_nav

(Required) The settings adminbar nav array.


Top ↑

Return Return

(array)


Top ↑

Source Source

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

428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
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'  => _x( 'Profile', 'My Account Settings sub nav', 'buddypress' ),
        'href'   => trailingslashit( $settings_link . 'profile' )
    );
 
    return $wp_admin_nav;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.