[wp-trac] [WordPress Trac] #14915: Fix activation hook inconsistency
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 23 01:08:54 UTC 2010
#14915: Fix activation hook inconsistency
--------------------------+-------------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.1
Component: Plugins | Version: 2.9
Severity: normal | Keywords: needs-patch
--------------------------+-------------------------------------------------
Comment(by joelhardi):
Lines 1033-1036 that I deleted are the reactivation code.
Immediately after, $update_actions gets set, but you'll notice that right
afterward it's unset if the plugin is already active (which it is). So, I
*think* I got everything. Definitely can verify that the activation hook
wasn't being called.
On second look, I guess setting and then immediately unsetting that var
based on an if statement is kinda lame, and it would be better to just do:
{{{
if ( ! $this->plugin_active )
$update_actions = array(
'activate_plugin' => ...
'plugins_page' => ...
);
}}}
I'll redo the patch. And, will upload this test plugin.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14915#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list