[wp-trac] Re: [WordPress Trac] #7048: Support for style.php in themes

WordPress Trac wp-trac at lists.automattic.com
Wed May 28 07:11:43 GMT 2008


#7048: Support for style.php in themes
-------------------------+--------------------------------------------------
 Reporter:  dglenny      |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:  2.7      
Component:  Template     |      Version:  2.5.1    
 Severity:  normal       |   Resolution:           
 Keywords:  needs-patch  |  
-------------------------+--------------------------------------------------
Changes (by Viper007Bond):

  * keywords:  => needs-patch
  * version:  => 2.5.1
  * component:  General => Template

Comment:

 You don't need to alter any core files -- just have your theme load
 `style.php` rather than `style.css` (which can be blank):

 {{{
 <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory');
 ?>/style.php" type="text/css" media="screen" />
 }}}

 Although using a `.php` stylesheet for dynamic content tends to be a bad
 idea as it's cached by the user's browser meaning any changes won't take
 effect. I'd suggest either adding a GET variable or even better, just
 having a master stylesheet (`style.css`) and then loading an additional
 stylesheet for the color you want.

 I have no opposition though to also checking for `style.php`, but I don't
 know if stuff would get broken by it or not.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7048#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list