custom plugin : hook bp_setup_globals is not fired
-
Hi; I’m making a new plugin. I have WP 3 & BP 1.2.4.1
I have a file loader.php with
function yclads_bp_init() {
require_once( YCLADS_BP_PLUGIN_PATH . 'includes/yclads-bp-core.php' );
}
add_action( 'bp_init', 'yclads_bp_init');
inside yclads-bp-core.php;
function bp_yclads_setup_globals() {
global $bp;// For internal identification
$bp->yclads->id = 'yclads';$bp->yclads->format_notification_function = 'bp_yclads_format_notifications';
$bp->yclads->slug = YCLADS_SLUG;// Register this in the active components array
$bp->active_components[$bp->yclads->slug] = $bp->yclads->id;do_action( 'bp_yclads_setup_globals' );
}
add_action( 'bp_setup_globals', 'bp_yclads_setup_globals' );
The function is not fired.
if I use
function bp_yclads_setup_globals() {
exit;
}
it does not exit.
Any idea ?
Thanks.
- The topic ‘custom plugin : hook bp_setup_globals is not fired’ is closed to new replies.