[wp-hackers] wp_die vs hooking into admin_notices

fris fris at fris.net
Fri Jan 28 20:15:46 UTC 2011


Was just using that as an example, to check for something that is installed,
say I want to check for something else that the plugin may require.

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Ozh
Sent: Friday, January 28, 2011 12:42 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] wp_die vs hooking into admin_notices

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/
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list