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

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 12 19:56:23 UTC 2012


#20027: Use get_(template|stylesheet) instead of get_option(
'(template|stylesheet)' )
-------------------------+------------------------------------
 Reporter:  ocean90      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Themes       |    Version:
 Severity:  normal       |   Keywords:  has-patch dev-feedback
-------------------------+------------------------------------
 While working on Gandalf we noticed, that it's not enough to filter the
 current theme with
 {{{
 add_filter( 'template', array( $this, 'get_template' ) );
 add_filter( 'stylesheet', array( $this, 'get_stylesheet' ) );
 }}}

 The reason are some uses of `get_option( 'template' )` or `get_option(
 'stylesheet' )`.

 Means we need additional filters:
 {{{
 add_filter( 'pre_option_stylesheet', array( $this, 'get_stylesheet' ) );
 add_filter( 'pre_option_template', array( $this, 'get_template' ) );
 }}}

 It would be handy if `get_option( '(template|stylesheet)' )` could be
 replaced with `get_(template|stylesheet)`.

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


More information about the wp-trac mailing list