buddypress/src/bp-notifications/bp-notifications-loader.php
Boone B Gorges b267316e92 Autoload BuddyPress classes.
Backward compatibility with SPL-disabled installations is included.

See #6853.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@10652 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2016-03-10 19:45:07 +00:00

27 lines
601 B
PHP

<?php
/**
* BuddyPress Member Notifications Loader.
*
* Initializes the Notifications component.
*
* @package BuddyPress
* @subpackage NotificationsLoader
* @since 1.9.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( ! buddypress()->do_autoload ) {
require dirname( __FILE__ ) . '/classes/class-bp-notifications-component.php';
}
/**
* Bootstrap the Notifications component.
*
* @since 1.9.0
*/
function bp_setup_notifications() {
buddypress()->notifications = new BP_Notifications_Component();
}
add_action( 'bp_setup_components', 'bp_setup_notifications', 6 );