[wp-trac] [WordPress Trac] #14912: Introduce register_upgrade_hook()

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 22 13:10:41 UTC 2010


#14912: Introduce register_upgrade_hook()
-----------------------------+----------------------------------------------
 Reporter:  scribu           |       Owner:                
     Type:  enhancement      |      Status:  new           
 Priority:  normal           |   Milestone:  Future Release
Component:  Upgrade/Install  |     Version:                
 Severity:  normal           |    Keywords:  needs-patch   
-----------------------------+----------------------------------------------

Comment(by ericmann):

 I like the changes.  Had I realized `is_multisite()` was used in
 `is_plugin_active_for_network()` I might have done it this way.  Though
 the `is_plugin_active` checks seem a bit redundant to me.  The code in the
 plugin calling `register_update_hook` will only get called if the plugin
 is active, correct?

 Does keying on `is_plugin_active` mean we can't use this hook for themes
 as well?  More theme developers are wrapping custom plugin functionality
 into their `functions.php` files, so I could see several situations where
 a theme author would want to use this hook as well.  If I'm right that the
 code will only be executed if the plugin is active, could we assume
 `is_plugin_active` will return true and replace that check with
 `is_multisite()` instead? (ala plugin-versions.3.diff)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14912#comment:20>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list