This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BP_Members_Admin::setup_globals()

Set admin-related globals.

Description

Source

File: bp-members/classes/class-bp-members-admin.php

	private function setup_globals() {
		$bp = buddypress();

		// Paths and URLs
		$this->admin_dir = trailingslashit( $bp->plugin_dir  . 'bp-members/admin' ); // Admin path.
		$this->admin_url = trailingslashit( $bp->plugin_url  . 'bp-members/admin' ); // Admin URL.
		$this->css_url   = trailingslashit( $this->admin_url . 'css' ); // Admin CSS URL.
		$this->js_url    = trailingslashit( $this->admin_url . 'js'  ); // Admin CSS URL.

		// Capability depends on config.
		$this->capability = bp_core_do_network_admin() ? 'manage_network_users' : 'edit_users';

		// The Edit Profile Screen id.
		$this->user_page = '';

		// The Show Profile Screen id.
		$this->user_profile = is_network_admin() ? 'users' : 'profile';

		// The current user id.
		$this->current_user_id = get_current_user_id();

		// The user id being edited.
		$this->user_id = 0;

		// Is a member editing their own profile.
		$this->is_self_profile = false;

		// The screen ids to load specific css for.
		$this->screen_id = array();

		// The stats metabox default position.
		$this->stats_metabox = new StdClass();

		// BuddyPress edit user's profile args.
		$this->edit_profile_args = array( 'page' => 'bp-profile-edit' );
		$this->edit_profile_url  = '';
		$this->edit_url          = '';

		// Data specific to signups.
		$this->users_page   = '';
		$this->signups_page = '';
		$this->users_url    = bp_get_admin_url( 'users.php' );
		$this->users_screen = bp_core_do_network_admin() ? 'users-network' : 'users';

		// Specific config: BuddyPress is not network activated.
		$this->subsite_activated = (bool) is_multisite() && ! bp_is_network_activated();

		// When BuddyPress is not network activated, only Super Admin can moderate signups.
		if ( ! empty( $this->subsite_activated ) ) {
			$this->capability = 'manage_network_users';
		}
	}

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.