Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bbPress forums (general, not groups), how to get “buddybar”?


Burt Adsit
Participant

@burtadsit

When you use deep integration bbpress clears all the actions and filters. bp runs on actions. It does this as part of the load sequence.

In bb-settings.php:

/**
* Remove filters and action that have been set by an included WordPress install
*/
if ( defined( 'ABSPATH' ) ) {
$wp_filter = array();
$wp_actions = array();
$merged_filters = array();
$wp_current_filter = array();
}

When I’m using xmlrpc I have to manually fire up the bp globals I want to refer to like:

function oci_bp_group_forums() {

// only do this if the xmlrpc server is firing up and we are servicing a request
if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ){
// bp's globals don't get set until a 'wp' action occurs. this seems to be all that is needed.
bp_core_setup_globals();
groups_setup_globals();
bp_activity_setup_globals();
}
}
add_action('init','oci_bp_group_forums');

That gets triggered by the end of the wp-load.php sequence. do_action(‘init’) is the last thing that happens there.

bp gets woke up by listening to the ‘wp’ action. I think all of bp gets activated by ‘wp’.

I just remember having some problems with xmlrpc and the ‘wp’ action so I manually tied things to the ‘init’ action. All the plugins for bp load, it’s lots of other stuff that gets initialized by ‘wp’.

Skip to toolbar