[wp-hackers] wp_die vs hooking into admin_notices
fris
fris at fris.net
Fri Jan 28 17:04:01 UTC 2011
Curious what would be the best way.
register_activation_hook(__FILE__,'curl_check');
function curl_notice() {
echo '<div id="my-custom-warning" class="error fade"><p>This plugin
requires CURL.</p></div>';
}
function curl_check(){
if (!function_exists('curl_init')) {
deactivate_plugins(basename(__FILE__));
add_action('admin_notices','curl_notice');
//wp_die("Sorry, but this plugin requires CURL.");
}
}
wp_dir or hook a function into admin_notices?
More information about the wp-hackers
mailing list