[wp-trac] [WordPress Trac] #25213: set_site_transient() incorrectly passes prefixed transient names to hooks when not using an object cache

WordPress Trac noreply at wordpress.org
Mon Sep 2 08:40:22 UTC 2013


#25213: set_site_transient() incorrectly passes prefixed transient names to hooks
when not using an object cache
--------------------------+-----------------------
 Reporter:  dd32          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  3.7
Component:  General       |    Version:  3.0
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------
 When using the hooks within set_site_transient(), developers are forced to
 cover two different cases, Object caching, and no object caching.

 This is because the value of the `$transient` is overwritten in the no-
 object cache case, ending up with two different action names fired:

 For those not using an object cache:
 `set_site_transient__site_transient_update_plugins`
 For those using an object cache: `set_site_transient_update_plugins`.

 The `setted_site_transient` hook also receives a prefixed value in the
 event of no object caching, ie, `update_plugins` for an object cache,
 `_site_transient_update_plugins` for no object cache.

 This appears to stretch back to [13148]

 Attached is a back compat patch for review

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25213>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list