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
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | 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
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.