[wp-hackers] register_activation_hook and PHP closure

Ryan Chan ryanchan404 at gmail.com
Wed Apr 25 12:08:16 UTC 2012


Seems register_activation_hook not support closure but not throwing out error?

e.g.

        register_activation_hook(__FILE__, function() {
            update_option('myplugin_activated', 1);
        });


However, register_uninstall_hook do throw out that closure cannot be
serialized error if I use closure.


More information about the wp-hackers mailing list