Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Plugin Developers: Changes around $bp global

Devrim, you can’t just set this stuff up outside of a function call. You should download the skeleton component to understand how to write WPMU capable plugins.

You need to wrap your code in a function then call it on the ‘wp’ action.

function mystuff() {

}

add_action( ‘wp’, ‘mystuff’ );

You are running into problems because your code is executing before anything has been set up. BuddyPress is entirely action based, if you start programming outside of this, you’ll run into many issues.

Skip to toolbar