[wp-trac] [WordPress Trac] #11956: Implement backward compatible site options and transients

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 28 00:40:05 UTC 2010


#11956: Implement backward compatible site options and transients
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:          
     Type:  defect (bug)       |       Status:  reopened
 Priority:  normal             |    Milestone:          
Component:  General            |      Version:  3.0     
 Severity:  major              |   Resolution:          
 Keywords:  needs-patch        |  
-------------------------------+--------------------------------------------
Changes (by nacin):

  * status:  closed => reopened
  * resolution:  worksforme =>


Comment:

 I'm going to re-open, as I think this could be solved on the core side.
 Simple solution is adding these to default-filters.php:
 {{{
 add_filter( 'pre_transient_update_core',           create_function( '',
 'return get_site_transient("update_core");'           ) );
 add_filter( 'pre_transient_theme_roots',           create_function( '',
 'return get_site_transient("theme_roots");'           ) );
 add_filter( 'pre_transient_update_themes',         create_function( '',
 'return get_site_transient("update_themes");'         ) );
 add_filter( 'pre_transient_update_plugins',        create_function( '',
 'return get_site_transient("update_plugins");'        ) );
 add_filter( 'pre_transient_dismissed_update_core', create_function( '',
 'return get_site_transient("dismissed_update_core");' ) );
 }}}

 That includes the 3.0 changes (and I think theme_roots was late 2.9). We
 could go back and also make the 2.8 changes (and the changes back)
 compatible as well if we wanted to.

 I guess the one thing this doesn't do is run the original filters, but
 that'd be tough. This would at the very least allow
 get_transient('update_plugins') to return the right value. Maybe that
 isn't much of a priority and maybe the filters are more important.

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


More information about the wp-trac mailing list