[wp-trac] Re: [WordPress Trac] #7875: consolidate plugin/theme/core upgrade/install functions

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 3 13:03:31 GMT 2009


#7875: consolidate plugin/theme/core upgrade/install functions
-----------------------------+----------------------------------------------
 Reporter:  DD32             |       Owner:  anonymous  
     Type:  enhancement      |      Status:  new        
 Priority:  highest omg bbq  |   Milestone:  2.8        
Component:  Administration   |     Version:  2.7        
 Severity:  major            |    Keywords:  needs-patch
-----------------------------+----------------------------------------------

Comment(by Denis-de-Bernardy):

 A separate note for the cron-related stuff, in case you did not give it
 thoughts yet. Some of that part definitely does NOT belong in the class.
 It should be managed as a separate function, that only loads the classes
 to the extent they're needed.


 {{{
 function update_plugin_cron() {
   // load classes
   include_once path/to/class-upgrader.php
   include_once path/to/class-upgrader-plugins.php
   // initialize and actually run the cron job
 }

 add_action('update_plugin_cron', 'update_plugin_cron');
 }}}

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


More information about the wp-trac mailing list