forked from buddyboss/buddyboss-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bp-loader.php
43 lines (36 loc) · 1.37 KB
/
bp-loader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Plugin Name: BuddyBoss Platform
* Plugin URI: https://buddyboss.com/
* Description: The BuddyBoss Platform adds community features to WordPress. Member Profiles, Activity Feeds, Direct Messaging, Notifications, and more!
* Author: BuddyBoss
* Author URI: https://buddyboss.com/
* Version: 2.7.40
* Text Domain: buddyboss
* Domain Path: /bp-languages/
* License: GPLv2 or later (license.txt)
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) && file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
require dirname( __FILE__ ) . '/vendor/autoload.php';
}
// Assume you want to load from build.
$bp_loader = dirname( __FILE__ ) . '/src/bp-loader.php';
$subdir = 'src';
if ( ! defined( 'BP_SOURCE_SUBDIRECTORY' ) ) {
// Set source subdirectory.
define( 'BP_SOURCE_SUBDIRECTORY', $subdir );
}
// Define overrides - only applicable to those running trunk.
if ( ! defined( 'BP_PLUGIN_DIR' ) ) {
define( 'BP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}
if ( ! defined( 'BP_PLUGIN_URL' ) ) {
// Be nice to symlinked directories.
define( 'BP_PLUGIN_URL', plugins_url( trailingslashit( basename( constant( 'BP_PLUGIN_DIR' ) ) ) ) );
}
// Include BuddyBoss Platform.
include( $bp_loader );
// Unset the loader, since it's loaded in global scope.
unset( $bp_loader );