[wp-trac] [WordPress Trac] #24016: RFE : Amend coding standards so that theme developers place dynamic styles in separate files
WordPress Trac
noreply at wordpress.org
Tue Apr 9 21:42:57 UTC 2013
#24016: RFE : Amend coding standards so that theme developers place dynamic styles
in separate files
-------------------------+----------------------------
Reporter: pembo13 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: WordPress.org
Component: Themes | Version: 3.5
Severity: normal | Resolution:
Keywords: needs-codex |
-------------------------+----------------------------
Comment (by pembo13):
I wasn't sure what the best medium was to start this discussion.
I have one suggestion so far, there may be others, and it can definitely
be cleaned up to make more Wordpress friendly.
'''Example Solution'''
1. use optional standard file: ''THEME_FOLDER/dynamic-styles.php''
2. if file exists in theme register stylesheet
3. when visitor user-agent requests the URL path pointing to ''dynamic-
styles.php''
1. generate last modified date (could be based on time-to-live and
current time)
2. generate expiration date (offset from last modified date based on
TTL)
3. generate E-Tag based on last modified date
4. check for matches on ''HTTP_IF_MODIFIED_SINCE'' and
''HTTP_IF_NONE_MATCH'' and serve HTTP 304 if matching
5. if no match serve headers
6. generate styles based on theme needs (could be filters, or action
hooks, etc.)
7. serve response with HTTP 200 and ''content-type: text/css''
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24016#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list