-
Notifications
You must be signed in to change notification settings - Fork 0
/
bp-loader.php
54 lines (45 loc) · 1.5 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
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* The BuddyPress Plugin
*
* BuddyPress is social networking software with a twist from the creators of WordPress.
*
* @package BuddyPress
* @subpackage Main
*/
/**
* Plugin Name: BuddyPress
* Plugin URI: https://buddypress.org
* Description: BuddyPress helps you build any type of community website using WordPress, with member profiles, activity streams, user groups, messaging, and more.
* Author: The BuddyPress Community
* Author URI: https://buddypress.org
* Version: 2.6.0-alpha
* Text Domain: buddypress
* Domain Path: /bp-languages/
* License: GPLv2 or later (license.txt)
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
// Assume you want to load from build
$bp_loader = dirname( __FILE__ ) . '/build/bp-loader.php';
// Load from source if no build exists
if ( ! file_exists( $bp_loader ) || defined( 'BP_LOAD_SOURCE' ) ) {
$bp_loader = dirname( __FILE__ ) . '/src/bp-loader.php';
$subdir = 'src';
} else {
$subdir = 'build';
}
// 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 BuddyPress
include( $bp_loader );
// Unset the loader, since it's loaded in global scope
unset( $bp_loader );