Re: how to invoke bbpress from a bp plugin? (for $bbdb settings and meta options)
sorry for the triple post but found the root problem.
Fatal error: Cannot redeclare checked() (previously declared in D:xampplitehtdocsbuddypresswp-contentpluginsbuddypressbp-forumsbbpressbb-adminincludesfunctions.bb-admin.php:1261) in D:xampplitehtdocsbuddypresswp-adminincludestemplate.php on line 387
and the fix…
function adminfix_adminfix_bbpress_init() {
global $bbdb, $bb_roles, $wp_roles;
if ( is_object( $bbdb ) && is_object( $bb_roles ) ) {
return;
}
if ( is_object( $bbdb ) ) {
$bb_roles =& $wp_roles;
bb_init_roles( $bb_roles );
return;
}
do_action( 'bbpress_init');
}
function bp_forums_extras_setup_globals() {
adminfix_adminfix_bbpress_init();
do_action('bp_forums_extras_init');
}
if (WP_ADMIN) {
add_action( 'admin_init', 'bp_forums_extras_setup_globals', 500 );
} else {
add_action( 'bp_init', 'bp_forums_extras_setup_globals', 5 );
}