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.

BuddyPress::setup_globals()

Component global variables.

Description

Source

File: class-buddypress.php

	private function setup_globals() {

		/** Versions **********************************************************/

		$this->version    = '1.0.0';
		$this->db_version = 13731;

		/** Loading ***********************************************************/

		/**
		 * Should deprecated code be loaded?
		 *
		 * @since BuddyPress 2.0.0 Defaults to false always
		 * @since BuddyPress 2.8.0 Defaults to true on upgrades, false for new installs.
		 */
		$this->load_deprecated = false;

		/** Toolbar ***********************************************************/

		/**
		 * @var string The primary toolbar ID.
		 */
		$this->my_account_menu_id = '';

		/** URIs **************************************************************/

		/**
		 * @var int The current offset of the URI.
		 * @see bp_core_set_uri_globals()
		 */
		$this->unfiltered_uri_offset = 0;

		/**
		 * @var bool Are status headers already sent?
		 */
		$this->no_status_set = false;

		/** Components ********************************************************/

		/**
		 * @var string Name of the current BuddyPress component (primary).
		 */
		$this->current_component = '';

		/**
		 * @var string Name of the current BuddyPress item (secondary).
		 */
		$this->current_item = '';

		/**
		 * @var string Name of the current BuddyPress action (tertiary).
		 */
		$this->current_action = '';

		/**
		 * @var bool Displaying custom 2nd level navigation menu (I.E a group).
		 */
		$this->is_single_item = false;

		/** Root **************************************************************/

		/**
		 * Filters the BuddyPress Root blog ID.
		 *
		 * @since BuddyPress 1.5.0
		 *
		 * @const constant BP_ROOT_BLOG BuddyPress Root blog ID.
		 */
		$this->root_blog_id = (int) apply_filters( 'bp_get_root_blog_id', BP_ROOT_BLOG );

		/** Paths**************************************************************/

		// BuddyPress root directory
		$this->file           = constant( 'BP_PLUGIN_DIR' ) . 'bp-loader.php';
		$this->basename       = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php';
		$this->plugin_dir     = trailingslashit( constant( 'BP_PLUGIN_DIR' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) );
		$this->plugin_url     = trailingslashit( constant( 'BP_PLUGIN_URL' ) . constant( 'BP_SOURCE_SUBDIRECTORY' ) );

		// Languages
		$this->lang_dir       = $this->plugin_dir . 'bp-languages';

		// Templates (theme compatibility)
		$this->themes_dir     = $this->plugin_dir . 'bp-templates';
		$this->themes_url     = $this->plugin_url . 'bp-templates';

		// Languages
		$this->integration_dir = $this->plugin_dir . 'bp-integrations';
		$this->integration_url = $this->plugin_url . 'bp-integrations';

		/** Theme Compat ******************************************************/

		$this->theme_compat   = new stdClass(); // Base theme compatibility class
		$this->filters        = new stdClass(); // Used when adding/removing filters

		/** Users *************************************************************/

		$this->current_user   = new stdClass();
		$this->displayed_user = new stdClass();

		/** Post types and taxonomies *****************************************/

		/**
		 * Filters the post type slug for the email component.
		 *
		 * since 2.5.0
		 *
		 * @param string $value Email post type slug.
		 */
		$this->email_post_type     = apply_filters( 'bp_email_post_type', 'bp-email' );

		/**
		 * Filters the post type slug for the profile type component.
		 *
		 * since BuddyBoss 1.0.0
		 *
		 * @param string $value Profile Type post type slug.
		 */
		$this->member_type_post_type     = apply_filters( 'bp_member_type_post_type', 'bp-member-type' );

		/**
		 * Filters the post type slug for the group type component.
		 *
		 * since BuddyBoss 1.0.0
		 *
		 * @param string $value Group Type post type slug.
		 */
		$this->group_type_post_type     = apply_filters( 'bp_group_type_post_type', 'bp-group-type' );

		/**
		 * Filters the taxonomy slug for the email type component.
		 *
		 * @since BuddyPress 2.5.0
		 *
		 * @param string $value Email type taxonomy slug.
		 */
		$this->email_taxonomy_type = apply_filters( 'bp_email_tax_type', 'bp-email-type' );

		/**
		 * Filters the post type slug for the invites component.
		 *
		 * since BuddyBoss 1.0.0
		 *
		 * @param string $value Group Type post type slug.
		 */
		$this->invite_post_type     = apply_filters( 'bp_invite_post_type', 'bp-invite' );
	}

Changelog

Changelog
Version Description
BuddyPress 1.6.0 BuddyPress 1.6.0
BuddyBoss 1.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.