[wp-trac] Re: [WordPress Trac] #8712: Previewing Themes

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 24 08:16:31 GMT 2008


#8712: Previewing Themes
--------------------------+-------------------------------------------------
 Reporter:  shinsou       |        Owner:         
     Type:  defect (bug)  |       Status:  closed 
 Priority:  normal        |    Milestone:         
Component:  Themes        |      Version:         
 Severity:  minor         |   Resolution:  invalid
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by DD32):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 It would be appreciated if you'd use the WordPress.org Support forums for
 help requests, Trac is for reporting and tracking of bugs and current
 enhancements. Whilst i could Ignore it and just close this ticket, I'll
 close it and give an explanation of your problem:

 Your issue, Is that while previewing a theme, the template, stylesheet and
 a nonce are passed as $_GET variables, This informs WordPress that it is a
 theme-preview attempt, and WordPress ignores the database options.

 In the case of having a PHP stylesheet which dynamically generates CSS,
 You'll need to pass the same GET variables and nonce to your style.php
 script, Using a PHP script as a stylesheet is a bad move IMO, Its
 effectivly doubling your server load since it needs to load WordPress for
 every check of the CSS file too (Which allthough caching helps, most
 browsers will re-check quite often).

 My suggestion: Dont include a external php stylesheet which loads WP;
 Include a normal style.css script that has the majority of styles, and
 output a <style>...</style> block in your themes header, That'll reduce
 the server load, increase loading times, and you wont have the theme
 preview issues.

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


More information about the wp-trac mailing list