[wp-hackers] Re: error message on plugin activation, how to ?
DD32
wordpress at dd32.id.au
Mon Dec 15 06:47:22 GMT 2008
I'll probably be adding something similar to this to my plugins then:
register_activation_hook(__FILE__, 'myplugin_activate');
if( isset($_GET['action']) && 'error_scrape' == $_GET['action']) {
myplugin_activate(); //for pre-2.7 compat
}
function myplugin_activate() {
deactivate_plugins(plugin_basename(__FILE__));
die('never activate');
}
2008/12/15 DD32 <wordpress at dd32.id.au>
> Ah..... I've only just realised, in pre-2.7 the activation hook isnt run on
> the error scrape window, So the error from die() is not shown.
>
> I've been running trunk for too long.. I forget what old versions are
> like..
> 2008/12/15 andré renaut <andre.renaut at gmail.com>
>
>> Thanks DD32,
>>
>> die() is not the smartest way to have a message displayed on plugins.php
>> page ...
>>
>> i found this :
>> http://nerdlife.net/2008/07/15/wordpress-plugin-installation-hackery/
>>
>> but i am still looking for an even smarter way !
>> _______________________________________________
>> 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