[wp-hackers] Plugin Update

Brian Krausz brian at nerdlife.net
Tue Feb 3 01:06:56 GMT 2009


Fair enough, it was a hack that I throw together off the top of my head at
1am :-P.

--Brian

On Fri, Jan 30, 2009 at 4:46 AM, DD32 <wordpress at dd32.id.au> wrote:

> 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)
> _______________________________________________
> 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