BP_Members_Admin::user_profile_menu()

Create the /user/ admin Profile submenus for all members.

Description

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',  'buddyboss' ),
			__( 'Edit Profile',  'buddyboss' ),
			'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
BuddyPress 2.1.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.