Hi guys, while updating one of my plugins, I tried deactivating WPGeoDirectory to see how my check worked. I discovered that your add-on plugins are not handling the missing plugin gracefully.
// First check if geodir main pluing is active or not.
if (!get_option('geodir_installed')) {
$error = new WP_Error('broke', __('<span style="color:#FF0000">There was an issue determining where GeoDirectory Plugin is installed and activated. Please install or activate GeoDirectory Plugin.</span>', GEODIRAUTOCOMPLETER_TEXTDOMAIN));
echo $error->get_error_message();
die;
}
This function takes the user to a new page and then DIEs. Leaving them with a blank screen & your error. Clicking back produces the same error again as the function runs again. I got caught in a pretty bad loop this way and had to work hard to get out of it.
Might I suggest something more WordPress-y?
if (!get_option('geodir_installed')) {
if( !( function_exists('gd_not_installed_error') ) ){
function gd_not_installed_error(){
$error = new WP_Error('broke', __('<span style="color:#dd3d36">There was an issue determining where GeoDirectory Plugin is installed and activated. Please install or activate GeoDirectory Plugin.</span>', 'gd-exporter'));
echo '<div class="error">';
echo $error->get_error_message();
echo '</div>';
}
}
add_action( 'admin_notices', 'gd_not_installed_error' );
}