[wp-hackers] wp_die vs hooking into admin_notices

Ozh ozh at ozh.org
Fri Jan 28 17:41:57 UTC 2011


The best way would be not to rely on curl but use the HTTP API instead.
http://codex.wordpress.org/HTTP_API

Ozh

On Fri, Jan 28, 2011 at 6:04 PM, fris <fris at fris.net> wrote:
> 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?
>
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
http://ozh.org/


More information about the wp-hackers mailing list