BP_Notifications_Component::setup_globals( array $args = array() )
Set up component global data.
Description Description
See also See also
- BP_Component::setup_globals(): for a description of arguments.
Parameters Parameters
- $args
-
(Optional) See BP_Component::setup_globals() for a description.
Default value: array()
Source Source
File: bp-notifications/classes/class-bp-notifications-component.php
public function setup_globals( $args = array() ) {
$bp = buddypress();
// Define a slug, if necessary.
if ( ! defined( 'BP_NOTIFICATIONS_SLUG' ) ) {
define( 'BP_NOTIFICATIONS_SLUG', $this->id );
}
// Global tables for the notifications component.
$global_tables = array(
'table_name' => $bp->table_prefix . 'bp_notifications',
'table_name_meta' => $bp->table_prefix . 'bp_notifications_meta',
);
// Metadata tables for notifications component.
$meta_tables = array(
'notification' => $bp->table_prefix . 'bp_notifications_meta',
);
// All globals for the notifications component.
// Note that global_tables is included in this array.
$args = array(
'slug' => BP_NOTIFICATIONS_SLUG,
'has_directory' => false,
'search_string' => __( 'Search Notifications...', 'buddypress' ),
'global_tables' => $global_tables,
'meta_tables' => $meta_tables
);
parent::setup_globals( $args );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.9.0 | Introduced. |