Hi Andrew,<br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote"><i><b><span style="color: rgb(0, 0, 153);">It's Otto and Chip. Responses don't get more logical.</span></b><br>
</i></blockquote><br>Actually, the responses from Otto and Chip have definite room for improvement, with regards to their logical merit. Their arguments rely heavily on assumptions derived from personal experiences, opinions, and philosophies that are neither documented nor mutually understood by all participants of this mailing list. <br>
<br>Their arguments also contain contradictory assertions that fluctuate between topics to support the opinion du jour. The most obvious example in this thread is the variation in assertions about the extent to which a theme developer should concern himself/herself with WordPress plugins. For example, consider the following (highlighted) snippets, which I've extracted from Chip 'n' Otto responses in just the past week:<br>
<br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote"><i>So there probably are some shared sites that don't work that way, and <br>
create accounts with apache/nobody as owners. From my perspective, <br>forcing themes to use the unfriendly WPFilesystem instead of fopen is <br>the wrong solution for several reasons...</i>[for example]<i>...it totally <br>
ignores the possibility of the unrestricted plugins that can use fopen <br>as freely as they like. <br></i></blockquote><br><blockquote style="margin: 0pt 0pt 0pt 12.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote">
<i><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">Irrelevant. Can we stop bringing up what Plugins can do, and how they </span><br style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">behave? It's just simply not going to be an entertained argument, </span><br style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">because we have absolutely NO control over Plugins.</span><br></i></blockquote><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote">
<i>A much better approach would be to make the solution a bit more global - <br>one that would help protect sites that use plugins as well as themes. <br>One that would educate the end users, and help web security as a whole. <br>
</i></blockquote><br><blockquote style="margin: 0pt 0pt 0pt 12.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><i style="color: rgb(102, 102, 102); background-color: rgb(255, 255, 153);">A laudable goal, but one that is outside the scope of the Theme Review <br>
Team. We are tasked with reviewing and approving Themes submitted for <br>inclusion in the WPORG repository.</i><br></blockquote><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
<i><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">Until then, the </span><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);" class="il">Theme</span><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);"> Review Team must operate on the playing field as it currently exists.</span><br>
</i></blockquote><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote"><i>Now we have a solution that helps everyone. Plugins that use fopen are <br>
now safer. Theme writers can use methods that lead to an optimal user <br>experience. And we don't waste anybody's time on servers that aren't <br>affected by a problem that should handled at that level anyway. <br>
</i></blockquote><br><blockquote style="margin: 0pt 0pt 0pt 12.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><i style="color: rgb(153, 153, 153);"><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">Again: a laudable suggestion - but one that is entirely outside the </span><br style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">scope of the Theme Review Team.</span> Bring it up on the Hackers list. Open <br>some core Trac tickets, and submit some patches. Start the discussion at <br>
the *core* level.</i><br></blockquote><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(102, 102, 102);" class="gmail_quote"><i style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">Fixing problems in unrelated code is out of scope for a theme to do<br>
in the first place. Themes control how the site looks, not what's on<br>
the site or how plugins work.</i><i><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);"></span><br></i></blockquote><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote">
<i><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">The best-case solution, IMHO, is better education of Plugin developers.</span> <br>Rather than spend time building into your Theme "correction" code for a <br>
Plugin, why not ping the Plugin developer, and submit a patch for the <br>Plugin itself? That way, every single user of the Plugin benefits from <br>the effort.<br></i></blockquote><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">
<i><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">Fixing a plugin directly gets the fix to everybody that uses the plugin. </span><br style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">It promotes collaboration. You can help out other people, even people </span><br style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">who may not use your theme.</span><br></i></blockquote><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(102, 102, 102);" class="gmail_quote">
<i><span style="background-color: rgb(255, 255, 153);">Wouldn't it be better to simply fix the plugin to not have the problem</span><br style="background-color: rgb(255, 255, 153);"><span style="background-color: rgb(255, 255, 153);">
in the first place? To make the plugin smarter and able to do what</span><br style="background-color: rgb(255, 255, 153);"><span style="background-color: rgb(255, 255, 153);">
you're suggesting in a better way?</span><br></i></blockquote><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote">
<i><span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">Contact every plugin author and provide them suggestions as to how to</span><br style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 255, 153); color: rgb(102, 102, 102);">
correct their code. It is the preferable solution.</span><br></i></blockquote><br><br><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(0, 0, 153);" class="gmail_quote">
<b><i>If you're going to apologize for not explaining things adequately, backhanded remarks like that aren't necessary.<br></i></b></blockquote><br>First of all, I wasn't apologizing, and I apologize for being unclear about that.<br>
<br>Second of all, I'd argue that backhanded remarks--or more generally, passive aggression and insults--are not only a perfectly-acceptable means of communication in this mailing list, but that they're the defining characteristic of most of Otto's responses (and occasionally Chip's). For example:<br>
<br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote"><i>Your <span style="background-color: rgb(255, 204, 204); color: rgb(102, 102, 102);">hacky</span> workarounds to <span style="color: rgb(102, 102, 102); background-color: rgb(255, 204, 204);">perceived</span> problems may end up causing other <br>
people problems in other ways.<br></i></blockquote><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(153, 153, 153);" class="gmail_quote"><i>To put this into perspective, if I found a theme intentionally messing <br>
with the output of one of my plugins, then both the theme and the [theme] <br>author would enter my permanent blacklist. <span style="background-color: rgb(255, 204, 204); color: rgb(102, 102, 102);">I'd probably consider adding </span><br style="background-color: rgb(255, 204, 204); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 204, 204); color: rgb(102, 102, 102);">code to my plugin to disable your code that breaks it, and then add </span><br style="background-color: rgb(255, 204, 204); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 204, 204); color: rgb(102, 102, 102);">comments that display to the user saying something about what a jerk you </span><br style="background-color: rgb(255, 204, 204); color: rgb(102, 102, 102);">
<span style="background-color: rgb(255, 204, 204); color: rgb(102, 102, 102);">are.</span><br></i></blockquote><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(102, 102, 102);" class="gmail_quote">
<i><span style="background-color: rgb(255, 204, 204);">It is not your place to attempt to fix all the code in the world by </span><br style="background-color: rgb(255, 204, 204);"><span style="background-color: rgb(255, 204, 204);">putting half-baked hacks into your theme.</span> <br>
</i></blockquote><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(102, 102, 102);" class="gmail_quote"><i><span style="background-color: rgb(255, 204, 204);">Collaboration. Try it sometime.</span><br>
</i></blockquote><br><br><br><br><br><br><br><blockquote style="margin: 0pt 0pt 0pt 6.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; color: rgb(0, 0, 153);" class="gmail_quote"><b><i>I agree with them. You're doing it wrong. And approaching it wrong, too.
We're all quite approachable, but that comes with the caveat of doing
so the right way.<br></i></b></blockquote><br>Unfortunately, I don't know you any more than I know Otto and Chip. If there's a prerequisite to joining this mailing list--for example, an understanding of the social hierarchy of WordPress contributors--then that should be made clearer during the subscription process. Until then, I will continue to participate in these discussions under the assumption that each issue should be judged by <i><b>the facts presented</b></i> and not by signals such as <b><i>Andrew said so</i></b>. Even if said prerequisites were made clear, <i>Appeal to Authority</i> and <i>Appeal to Celebrity</i> are logical fallacies--invalid reasoning that shouldn't be promoted in any debate.<br>
<br><br><br>Now then...<br><br>Assuming we're all done arguing over <b>nothing</b>, I'd like to propose a specific example of using output buffering.<br><br><br><br><b style="color: rgb(153, 0, 0);"><u>Without</u> output buffering:</b><br>
<br><head><br> <meta charset="<?php bloginfo( 'charset' ); ?>" /><br> <title><?php wp_title( '|', true, 'right' ); ?></title><br> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /><br>
<?php<br> <b style="color: rgb(153, 0, 0);">wp_head();</b><br> ?><br></head><br><br><b>Result:</b> theme's user has no control over wp_head() output--in other words, no control over the content that plugins insert into the page's <head> section.<br>
<br><br><br><b style="color: rgb(51, 51, 255);"><u>With</u> output buffering:</b><br><br><head><br> <meta charset="<?php bloginfo( 'charset' ); ?>" /><br> <title><?php wp_title( '|', true, 'right' ); ?></title><br>
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /><br> <?php<br><i><span style="color: rgb(0, 153, 0);"> // Start output buffering.</span></i><br>
<b style="color: rgb(51, 51, 255);">ob_start();</b><br><br><i><span style="color: rgb(0, 153, 0);"> // Any plugins that use the wp_head hook to insert meta tags, CSS, </span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);"> // scripts, etc. will still function as intended, the only difference here </span><br style="color: rgb(0, 153, 0);"><span style="color: rgb(0, 153, 0);"> // is that they'll print to the output buffer instead of echoing directly </span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);"> // to the output stream.</span></i><br> <b style="color: rgb(51, 51, 255);">wp_head();</b><br><br><i><span style="color: rgb(0, 153, 0);"> // Stop the output buffering and store the buffer content (as a string) </span><br style="color: rgb(0, 153, 0);">
<span style="color: rgb(0, 153, 0);"> // in $my_wp_head_content.</span></i><br> <b><span style="color: rgb(51, 51, 255);">$my_wp_head_content = ob_get_clean();</span></b><br><br><i style="color: rgb(0, 153, 0);"> // If a filter has been defined by the theme's user, run our buffer <br>
// content through it and echo it. If no filter is defined, just echo the <br> // content like usual (in other words, execute wp_head default behavior).</i><br> <b><span style="color: rgb(51, 51, 255);">echo apply_filters( 'my_custom_wp_head_filter', $my_wp_head_content );</span></b><br>
?><br></head><br><br><b>Result:</b> theme's user has the ability to filter the output of wp_head()--in
other words, theme's user can:<br><ul><li>Add or remove meta tags, CSS, scripts, etc.</li><li>Rearrange the order of meta tags, CSS, scripts, etc.</li><li>Edit the content of meta tags, CSS, scripts, etc.</li></ul>Real examples of things I'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="canonical" 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'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.</li>
</ul><br>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 <head> section, essentially advertising his/her website. More generally, not a solution for cases where "the right way" is subjective.</li>
<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't be ignored.<br>
</li></ul><br><br>Okay, I'm done. Fire away.<br><br><br><br><br><br><br><br><br><div class="gmail_quote">On Fri, Jul 1, 2011 at 1:10 AM, Andrew Nacin <span dir="ltr"><<a href="mailto:wp@andrewnacin.com">wp@andrewnacin.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Thu, Jun 30, 2011 at 1:58 AM, Gmail <span dir="ltr"><<a href="mailto:darrenslatten@gmail.com" target="_blank">darrenslatten@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The illogical responses from you and Chip lead me to believe that I must not be explaining this adequately. I will return to this topic in a few days, when I have my computer up and running again, and I can insert code examples for clarity. Currently, I'm trying to respond via iPhone, and it's not doing this issue any justice. I'll be back.<br>
</blockquote><div><br></div></div><div>It's Otto and Chip. Responses don't get more logical.</div><div><br></div><div>If you're going to apologize for not explaining things adequately, backhanded remarks like that aren't necessary.</div>
<div><br></div><div>I agree with them. You're doing it wrong. And approaching it wrong, too. We're all quite approachable, but that comes with the caveat of doing so the right way.</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><br clear="all"><br>-- <br>-Darren Slatten<br><br>