[wp-trac] [WordPress Trac] #20027: Use get_(template|stylesheet) instead of get_option( '(template|stylesheet)' )

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 2 20:08:49 UTC 2012


#20027: Use get_(template|stylesheet) instead of get_option(
'(template|stylesheet)' )
-------------------------+------------------
 Reporter:  ocean90      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.4
Component:  Themes       |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------

Comment (by nacin):

 The issue with the change in get_raw_theme_root() is two-fold:

  - One, it's designed to not be a filtered result.

  - Two, the get_option('stylesheet') and get_option('template') checks are
 within a branch where it also checks for get_option('stylesheet_root').
 This means if someone is filtering only template or stylesheet, they will
 mess up the return value of the function as they are not accounting for
 stylesheet_root and template_root. So I'd almost rather rather leave it at
 get_option() and force customize to continue to filter both values.
 (Customize will likely need to disable update checks via wp_update_themes,
 though.)

 Thoughts?

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


More information about the wp-trac mailing list