BP_Friends_Component::setup_globals( array $args = array() )
Set up bp-friends global settings.
Description
The BP_FRIENDS_SLUG constant is deprecated, and only used here for backwards compatibility.
See also
- BP_Component::setup_globals(): for description of parameters.
Parameters
- $args
-
(Optional) See BP_Component::setup_globals().
Default value: array()
Source
File: bp-friends/classes/class-bp-friends-component.php
public function setup_globals( $args = array() ) { $bp = buddypress(); // Deprecated. Do not use. // Defined conditionally to support unit tests. if ( ! defined( 'BP_FRIENDS_DB_VERSION' ) ) { define( 'BP_FRIENDS_DB_VERSION', '1800' ); } // Define a slug, if necessary. if ( ! defined( 'BP_FRIENDS_SLUG' ) ) { define( 'BP_FRIENDS_SLUG', $this->id ); } // Global tables for the friends component. $global_tables = array( 'table_name' => $bp->table_prefix . 'bp_friends', 'table_name_meta' => $bp->table_prefix . 'bp_friends_meta', ); // All globals for the friends component. // Note that global_tables is included in this array. $args = array( 'slug' => BP_FRIENDS_SLUG, 'has_directory' => false, 'search_string' => __( 'Search Connections…', 'buddyboss' ), 'notification_callback' => 'friends_format_notifications', 'global_tables' => $global_tables ); parent::setup_globals( $args ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.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.