[wp-hackers] register_activation_hook() problem

Austin Matzko if.website at gmail.com
Tue Jul 28 09:56:29 UTC 2009


On Tue, Jul 28, 2009 at 4:30 AM, Adam Taylor<adamjctaylor at gmail.com> wrote:
> Here's my code snippet:
>
>    global $thumbs;
>
>    function thumbs_install() {
>        $thumbs = new ThumbsUp();
>        $thumbs->installThumbsUp();
>    }

You want the global declaration inside of your function block instead:

>    function thumbs_install() {
>       global $thumbs;
>

> Any pointers?

You can learn about PHP variables here: <http://php.net/variables>


More information about the wp-hackers mailing list