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

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 20 12:06:42 GMT 2009


#7875: consolidate plugin/theme/core upgrade/install functions
----------------------------+-----------------------------------------------
 Reporter:  DD32            |       Owner:  anonymous              
     Type:  task (blessed)  |      Status:  new                    
 Priority:  high            |   Milestone:  2.8                    
Component:  Administration  |     Version:  2.7                    
 Severity:  major           |    Keywords:  has-patch needs-testing
----------------------------+-----------------------------------------------

Comment(by DD32):

 Replying to [comment:6 Denis-de-Bernardy]:
 > When I initially looked into this, the stuff for core, themes and
 plugins seemed close enough that it could have been done already. The
 WP_Upgrader class could take care of:
 >
 >  - setting up a cron automatically
 >  - periodically calling home to check for updates in a standardized
 manner
 >  - installing or upgrading when asked to (permission issues to consider
 here)
 >  - handling the calls to get more information on the install or upgrade
 by returning the url that should get opened using thickbox.
 >
 > The class doesn't need to care of the actual UI screens. Those are
 probably too unique to be shared. But it should expose an API that can be
 used in these screens, so as to spare oneself the hassle of needing to
 rewrite the workflow-related functions for each of plugin, theme, core...
 and in my case, skins.

 I dont think abstracting this is going to be possible (or rather, A good
 idea)

 Different API's return different results; Different input sets require
 checking different fields; Different Expire methods; etc. In the end, An
 abstracted method is going to take up more code, and not gain any benefits
 over something similar to whats in {{{wp-includes/update.php}}}

 Much like the UI cant be too generic, Nor can the update checking..

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


More information about the wp-trac mailing list