BP_Members_Admin::user_profile_menu()
Create the /user/ admin Profile submenus for all members.
Description Description
Source Source
File: bp-members/classes/class-bp-members-admin.php
public function user_profile_menu() {
// Setup the hooks array.
$hooks = array();
// Add the faux "Edit Profile" submenu page.
$hooks['user'] = $this->user_page = add_submenu_page(
'profile.php',
__( 'Edit Profile', 'buddypress' ),
__( 'Edit Profile', 'buddypress' ),
'exist',
'bp-profile-edit',
array( $this, 'user_admin' )
);
// Setup the screen ID's.
$this->screen_id = array(
$this->user_page . '-user',
$this->user_profile . '-user'
);
// Loop through new hooks and add method actions.
foreach ( $hooks as $key => $hook ) {
add_action( "load-{$hook}", array( $this, $key . '_admin_load' ) );
}
// Add the profile_admin_head method to proper admin_head actions.
add_action( "admin_head-{$this->user_page}", array( $this, 'profile_admin_head' ) );
add_action( "admin_head-profile.php", array( $this, 'profile_admin_head' ) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |