Re: Plugin Hall of Shame! :) Plugin Devs Please Read
Hi guys.
Try to use the new way to check that BP is active.
But, I got this problem :
Before, I had :
function bp_maps_init() {
require( dirname( __FILE__ ) . ‘/bp-maps.php’ );
}
if ( defined( ‘BP_VERSION’ ) )
bp_maps_init();
else
add_action( ‘bp_init’, ‘bp_maps_init’ );
now, with
function bp_maps_init() {
require( dirname( __FILE__ ) . ‘/bp-maps.php’ );
}
add_action( ‘bp_init’, ‘bp_maps_init’ );
The plugin brokes. Seems the hooks aren’t fired as it should or something like this :
My file bp-maps.php loads a file called “bp-maps-members-map.php”.
In this file, several functions are hooked
add_action( ‘bp_before_directory_members_content’,’bp_maps_members_map_link’); // this one fires
add_action( ‘plugins_loaded’,’bp_maps_members_map_screen’); // this one not
the function bp_maps_members_map_screen isn’t fired…What’s the problem ?
Tnx.