[wp-hackers] Plugin Update
DD32
wordpress at dd32.id.au
Fri Jan 30 09:46:39 GMT 2009
2009/1/30 Charles K. Clarkson <cclarkson at htcomp.net>:
>> add_action('update_plugins', 'hook_me_baby');
>> function hook_me_baby() {
>> static $run = false;
>> if(!$run) {
>> $run = true;
>> return;
>> }
>> $run = false;
>> //Your code
>> }
Ew Ew Ew! No no no! (Only for the fact i dont like conditional code
like that.. and you never know if the option is updated multiple times
or something....
Um, I dont have access to my source right now, however, Look at the
way the update occurs, from memory, i did something based off
last_checked & get_option on itself... Alternatively, I could've
mearly stuffed it up and its running my code on both of them (Ive not
done a full check over my code yet)
More information about the wp-hackers
mailing list