-
Notifications
You must be signed in to change notification settings - Fork 44
/
loader.php
48 lines (40 loc) · 1.07 KB
/
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
<?php
/*
Plugin Name: BuddyPress Docs
Plugin URI: http://github.com/boonebgorges/buddypress-docs
Description: Adds collaborative Docs to BuddyPress
Version: 2.2.3
Author: Boone B Gorges, David Cavins
Author URI: http://boone.gorg.es
Text Domain: buddypress-docs
Domain Path: /languages/
Licence: GPLv3
*/
/*
It's on like Donkey Kong
*/
define( 'BP_DOCS_VERSION', '2.2.3' );
require_once __DIR__ . '/vendor/autoload.php';
HardG\BuddyPress120URLPolyfills\Loader::init();
/*
* BuddyPress Docs introduces a lot of overhead. Unless otherwise specified,
* don't load the plugin on subsites of an MS install
*/
if ( ! defined( 'BP_DOCS_LOAD_ON_NON_ROOT_BLOG' ) ) {
define( 'BP_DOCS_LOAD_ON_NON_ROOT_BLOG', false );
}
/**
* Loads BP Docs files only if BuddyPress is present
*
* @package BuddyPress Docs
* @since 1.0-beta
*/
function bp_docs_init() {
global $bp_docs;
if ( is_multisite() && ! bp_is_root_blog() && ( ! BP_DOCS_LOAD_ON_NON_ROOT_BLOG ) ) {
return;
}
require dirname( __FILE__ ) . '/bp-docs.php';
$bp_docs = new BP_Docs();
}
add_action( 'bp_include', 'bp_docs_init' );