<div><font size="2"><font face="tahoma,sans-serif">This is definitely the most comprehensive WordPress related e-mail that I have ever seen.</font></font></div><div><font size="2"><font face="tahoma,sans-serif"></font></font> </div>
<div><font size="2"><font face="tahoma,sans-serif">Thanks Otto.</font></font></div><div><font size="2"><font face="tahoma,sans-serif"></font></font> </div><div><font size="2"><font face="tahoma,sans-serif">Emil</font></font></div>
<font size="2"><font face="tahoma,sans-serif"><div><br clear="all"></div></font></font><div><strong>Emil Uzelac</strong> | ThemeID | T: 224-444-0006 | Twitter: @EmilUzelac | E: <a href="mailto:emil@themeid.com" target="_blank">emil@themeid.com</a> | <a href="http://themeid.com/" target="_blank">http://themeid.com</a></div>
<div><font color="#999999">Make everything as simple as possible, but not simpler. - Albert Einstein</font></div><br>
<br><br><div class="gmail_quote">On Mon, Apr 4, 2011 at 9:51 PM, Otto <span dir="ltr"><<a href="mailto:otto@ottodestruct.com">otto@ottodestruct.com</a>></span> wrote:<br><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" class="gmail_quote">
<div class="im">On Mon, Apr 4, 2011 at 8:15 PM, Lmm Muc <<a href="mailto:lmmmuc@gmail.com">lmmmuc@gmail.com</a>> wrote:<br>
</div><div class="im">> I plan to write dynamic CSS to a file (ending on .css) located in the theme<br>
> folder<br>
<br>
</div>With regards to this specific problem, there is a couple of issues<br>
with the idea:<br>
<br>
1. On any kind of secure setup, you probably don't have permissions to<br>
write files into the themes directory. Using the upload folder would<br>
work, but suffers the same ownership problems. Using the WP_Filesystem<br>
to write the file works around this ownership and permissions problem,<br>
but if you write into the themes directory, a theme upgrade wipes out<br>
your static file.<br>
<br>
2. For any normal kind of theme, you probably don't have that much<br>
dynamic CSS that you actually need to create. You probably only have a<br>
few settings, for things like colors, fonts, etc. No more than 1K of<br>
code, probably. The dynamic CSS should go *inline* in the page itself.<br>
Minified, if you prefer.<br>
<br>
Look at how the custom_background and custom_header stuff in core<br>
works. It's creating CSS and then inserting it right into the page<br>
using the wp_head hook. That's the right way to do dynamic CSS. Not<br>
only does it avoid the whole writing files problem, but it also avoids<br>
an extra HTTP round trip to the server to get your dynamically-written<br>
static, but small, CSS file. It's actually faster and simpler to put<br>
the dynamic CSS inline on the page itself.<br>
<font color="#888888"><br>
-Otto<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</div></div></blockquote></div><br>