<br><br>
<div class="gmail_quote">On Sat, Jul 2, 2011 at 12:21 AM, Darren Slatten <span dir="ltr">&lt;<a href="mailto:darrenslatten@gmail.com">darrenslatten@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Real examples of things I&#39;ve personally used this functionality to accomplish on my own sites:<br>
<ul>
<li>Remove redundant references to jQuery (for example, 2 plugins queue the latest versions of jQuery that were available at the time of writing, however both plugins will function with one or the other--removing the redundant jQuery reference allows pages to load faster).</li>

<li>Remove plugin author attribution HTML comments (in compliance with GPL, of course).</li>
<li>Remove duplicate rel=&quot;canonical&quot; tag (caused by plugins incorporating this feature before WP core...and then WP catching up, adding a second occurrence).</li>
<li>Remove WP core scripts (e.g. reply.js and l10n.js) because I&#39;ve already appended them to the end of a global custom .js file.</li>
<li>Remove favicon references.</li>
<li>Change order of CSS and JS to optimize page load speed and prevent FOUC.<br></li></ul></blockquote>
<div>How do you ensure that this doesn&#39;t mess up plugin functionality when you&#39;re wrong about the necessity of the code a plugin is using?  Also, I&#39;m curious if you really save anything by buffering and processing it this way (given the sophistication of the filter).</div>

<div> </div>
<div> </div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Please note that my real examples rebut the following arguments:<br>
<ul>
<li><i><b>Notify the plugin author or submit patches</b></i>--not a solution in cases where plugin author has intentionally inserted a 4-line HTML comment into my &lt;head&gt; section, essentially advertising his/her website. More generally, not a solution for cases where &quot;the right way&quot; is subjective.</li>
</ul></blockquote>
<div>It&#39;s true they won&#39;t likely just change that, but how is it that the plugin authors are unable to code around your filter then?  So does this just end up being a code war between the theme developers and the plugin developers both trying to code around each other to get links in?  Do you put a link in your theme to an external site?</div>

<div> </div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<ul>
<li><i><b>If Theme and Plugins all enqueue jQuery properly, then there will *never* be duplicate jQuery scripts enqueued.</b></i>--not true in cases where specific/multiple jQuery versions are referenced. Also, wp_enqueue_script is @since 2.8, so backwards compatibility can&#39;t be ignored.<br>
</li></ul></blockquote>
<div>I agree with the point you&#39;re basically making with these two bullets that expecting plugins to be cleaned up is unrealistic, and there are legacy issues.  But the question is really if the solution is to code around that in the theme.  I understand your point of view, but at the bigger picture what needs to happen is if this stuff is coded around at all, it needs to be coded around via WP itself.  More likely the plugin developers just need a stricter set of standards.</div>

<div> </div>
<div>I think you can make a case for allowing this kind of thing temporarily when there isn&#39;t a solution for you or your theme users, but ultimately it shouldn&#39;t stay that way.</div>
<div> </div>
<div>My 2c</div>
<div> </div></div><br>