Because I didn't really know about enqueue for stylesheets until recently and now I've been so busy with work that I haven't got around to it since.<br clear="all"><br>Curtis McHale<br>PH: 604.751.3482<br><a href="http://www.curtismchale.ca">http://www.curtismchale.ca</a><br>
Linkedin: <a href="http://www.linkedin.com/in/curtismchale">http://www.linkedin.com/in/curtismchale</a><br>Twitter: <a href="http://twitter.com/curtismchale">twitter.com/curtismchale</a><br><br>
<br><br><div class="gmail_quote">On Thu, Apr 21, 2011 at 3:05 PM, Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Why not just enqueue your own "plugins" stylesheet, at wp_head, with a priority of 9999?<div><br></div><div><font color="#888888">Chip</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Thu, Apr 21, 2011 at 4:59 PM, Curtis McHale <span dir="ltr"><<a href="mailto:curtis@curtismchale.ca" target="_blank">curtis@curtismchale.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Funny on personal projects I put my stylesheet after wp_head so I can override the enqueued stylesheets for plugins that don't let you turn them off or are way over qualified and make it hard to write CSS rules that kill them. I know it's not best practice but it's way easier than fighting plugin CSS all day.<br clear="all">
<font color="#888888">
<br>Curtis McHale<br>PH: 604.751.3482<br><a href="http://www.curtismchale.ca" target="_blank">http://www.curtismchale.ca</a><br>Linkedin: <a href="http://www.linkedin.com/in/curtismchale" target="_blank">http://www.linkedin.com/in/curtismchale</a><br>
Twitter: <a href="http://twitter.com/curtismchale" target="_blank">twitter.com/curtismchale</a></font><div><div></div><div><br>
<br>
<br><br><div class="gmail_quote">On Thu, Apr 21, 2011 at 2:53 PM, Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net" target="_blank">chip@chipbennett.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I consider that to be by design, that the primary stylesheet, i.e. style.css, is hard-coded into the document head. That way, it's easier to override with enqueued stylesheets.<div><br></div><div>Chip<br><br><div class="gmail_quote">
On Thu, Apr 21, 2011 at 4:37 PM, Otto <span dir="ltr"><<a href="mailto:otto@ottodestruct.com" target="_blank">otto@ottodestruct.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you're going to require wp_enqueue_style for CSS files, then you<br>
might want to provide some good examples of how to do that for things<br>
like the normal style.css file and such, since the vast majority of<br>
themes do not use the enqueue for normal styling.<br>
<br>
-Otto<br>
<br>
<br>
<br>
On Fri, Apr 22, 2011 at 4:11 PM, Justin Tadlock<br>
<div><div></div><div><<a href="mailto:justin@justintadlock.com" target="_blank">justin@justintadlock.com</a>> wrote:<br>
> That's fine by me.<br>
><br>
> I thought we already had wp_enqueue_style() and wp_enqueue_script() in the<br>
> guidelines. Now, I see that it was just a reference to the comment reply<br>
> script.<br>
><br>
> On 4/21/2011 1:50 PM, Edward Caissie wrote:<br>
><br>
> I agree with "recommended" for adding additional stylesheets via<br>
> wp_enqueue_style() immediately and pushing it to required with 3.2; which<br>
> seems will not be all that far off.<br>
><br>
> I would also think that example, or similar ones, should be linked to so<br>
> authors have something to work from if/when they adapt this "new" method.<br>
><br>
><br>
> Cais.<br>
><br>
> On Thu, Apr 21, 2011 at 2:39 PM, Chip Bennett <<a href="mailto:chip@chipbennett.net" target="_blank">chip@chipbennett.net</a>> wrote:<br>
>><br>
>> I agree - but we rarely take something from a non-suggestion to *required*<br>
>> in one step, unless a critical need exists.<br>
>> The general path is to make something *recommended*, fit-test it for a<br>
>> while, and then bump it up to *required*.<br>
>> Chip<br>
>><br>
>> On Fri, Apr 22, 2011 at 1:27 PM, Justin Tadlock <<a href="mailto:justin@justintadlock.com" target="_blank">justin@justintadlock.com</a>><br>
>> wrote:<br>
>>><br>
>>> This should be the *required* way. Additional stylesheets should always<br>
>>> be added with wp_enqueue_style(). This is what I've been putting in my<br>
>>> reviews, even for conditional stylesheets.<br>
>>><br>
>>> On 4/21/2011 1:22 PM, Chip Bennett wrote:<br>
>>><br>
>>> I just found this:<br>
>>><br>
>>> <a href="http://iamzed.com/2010/01/07/using-wordpress-wp_enqueue_style-with-conditionals/" target="_blank">http://iamzed.com/2010/01/07/using-wordpress-wp_enqueue_style-with-conditionals/</a><br>
>>><br>
>>> wp_enqueue_style(<br>
>>> 'ie7-style',<br>
>>> get_template_directory_uri() . '/ie7.css'<br>
>>> );<br>
>>> global $wp_styles;<br>
>>> $wp_styles->add_data( 'ie7-style', 'conditional', 'lte IE 7′);<br>
>>><br>
>>> This might move into the Guidelines, as *Recommended* implementation of<br>
>>> enqueueing IE-conditional stylesheets. Thoughts?<br>
>>> Chip<br>
>>><br>
>>> _______________________________________________<br>
>>> theme-reviewers mailing list<br>
>>> <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
>>><br>
>>> _______________________________________________<br>
>>> theme-reviewers mailing list<br>
>>> <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> theme-reviewers mailing list<br>
>> <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
>><br>
><br>
><br>
> _______________________________________________<br>
> theme-reviewers mailing list<br>
> <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
><br>
> _______________________________________________<br>
> theme-reviewers mailing list<br>
> <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
><br>
><br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">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>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<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>
<br></blockquote></div><br>