Skip to content

Commit

Permalink
Moving the require of wp-admin/includes/plugin.php global init instea…
Browse files Browse the repository at this point in the history
…d of only in Mock Buddypress

This way other components can call is_plugin_active() to check if BuddyPress is active
  • Loading branch information
iandunn committed Jul 18, 2013
1 parent 5126ca6 commit 862f546
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions courseware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
1 change: 0 additions & 1 deletion mock-buddypress/mock-buddypress.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 862f546

Please sign in to comment.