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

329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
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.