From 862f54647d23dc278e8e29fb115441ea1033016d Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Thu, 18 Jul 2013 10:12:05 -0700 Subject: [PATCH] Moving the require of wp-admin/includes/plugin.php global init instead of only in Mock Buddypress This way other components can call is_plugin_active() to check if BuddyPress is active --- courseware.php | 1 + mock-buddypress/mock-buddypress.class.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/courseware.php b/courseware.php index c9be6d4..4d46200 100644 --- a/courseware.php +++ b/courseware.php @@ -23,6 +23,7 @@ define( 'BPSP_PLUGIN_FILE', basename( BPSP_PLUGIN_DIR ) . '/' . basename( __FILE__ ) ); /* Load the components */ + require_once ABSPATH . '/wp-admin/includes/plugin.php'; // To get is_plugin_active() for BuddyPress detection require_once BPSP_PLUGIN_DIR . '/wordpress/wordpress.class.php'; require_once BPSP_PLUGIN_DIR . '/mock-buddypress/mock-buddypress.class.php'; require_once BPSP_PLUGIN_DIR . '/roles/roles.class.php'; diff --git a/mock-buddypress/mock-buddypress.class.php b/mock-buddypress/mock-buddypress.class.php index 074dadf..d1738a3 100644 --- a/mock-buddypress/mock-buddypress.class.php +++ b/mock-buddypress/mock-buddypress.class.php @@ -6,7 +6,6 @@ function mockbp_init() { global $bp; - require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); if ( ! is_plugin_active( 'buddypress/bp-loader.php' ) ) { $bp->groups->current_group = $bp->groups = $bp = new stdClass();