[wp-trac] [WordPress Trac] #20313: get_theme_data can cause invalid WP_Theme object data to be persistantly cached

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 29 04:38:44 UTC 2012


#20313: get_theme_data can cause invalid WP_Theme object data to be persistantly
cached
-----------------------------+--------------------
 Reporter:  westi            |       Owner:  nacin
     Type:  defect (bug)     |      Status:  new
 Priority:  high             |   Milestone:  3.4
Component:  Themes           |     Version:  3.4
 Severity:  major            |  Resolution:
 Keywords:  has-patch close  |
-----------------------------+--------------------
Changes (by nacin):

 * keywords:  has-patch => has-patch close


Comment:

 [attachment:get_theme_data-subdirs-fix.diff] uses get_theme_root(). For
 reference, it was a design decision for the WP_Theme API to use raw,
 unfiltered values as much as possible. (The only situation where it does
 not is theme root URIs.) Hence, get_raw_theme_root() would be a better
 choice here.

 I looked at the problem and think [20316] is the best solution. I do
 remember testing this exact situation but I neglected to account for it in
 the end. It is something that WP_Theme should handle, given that after
 immersing myself in this for the entire month of March, I still made that
 mistake when deprecating get_theme_data().

 So, if WP_Theme is going to handle it, I think it is easiest if
 get_theme_data() just relies on the behavior.

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


More information about the wp-trac mailing list