<div dir="ltr">I will agree, not really our decision to make :) <div><br><div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 13, 2013 at 8:35 PM, Philip M. Hofer (Frumph) <span dir="ltr"><<a href="mailto:philip@frumph.net" target="_blank">philip@frumph.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:12pt;font-family:'Calibri'">
<div>Regardless, it’s not the place of the theme REVIEW team to make such
limitations unless a core developer states explicitly that a component is not
allowed to be distributed and used in themes.</div>
<div> </div>
<div>Damn power hungry cookie cutter loving mongrels <img style="BORDER-BOTTOM-STYLE:none;BORDER-RIGHT-STYLE:none;BORDER-TOP-STYLE:none;BORDER-LEFT-STYLE:none" alt="Winking smile" src="cid:EA4BD49E1E704931AAE17B5C5A93BF99@furious"> /grin</div>
<div> </div>
<div> </div>
<div style="font-size:small;font-style:normal;text-decoration:none;font-family:'Calibri';display:inline;font-weight:normal">
<div style="FONT:10pt tahoma">
<div><font size="3" face="Calibri"></font> </div>
<div style="BACKGROUND:#f5f5f5">
<div><b>From:</b> <a title="chip@chipbennett.net" href="mailto:chip@chipbennett.net" target="_blank">Chip Bennett</a> </div>
<div><b>Sent:</b> Saturday, July 13, 2013 5:54 PM</div>
<div><b>To:</b> <a title="theme-reviewers@lists.wordpress.org" href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">Discussion list for WordPress
theme reviewers.</a> </div>
<div><b>Subject:</b> Re: [theme-reviewers] Fwd: Theme Lab -
Shortcode</div></div></div>
<div> </div></div>
<div style="font-size:small;font-style:normal;text-decoration:none;font-family:'Calibri';display:inline;font-weight:normal"><div><div class="h5">
<div dir="ltr">Thanks for passing that along, Daniel.
<div> </div>
<div>And this list is certainly intended to discuss such things. Especially as
it directly relates to Guidelines/review philosophy, I wouldn't consider it
"junk".</div></div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sat, Jul 13, 2013 at 8:42 PM, Daniel <span dir="ltr"><<a href="mailto:danielx386@gmail.com" target="_blank">danielx386@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Hi guys,<br><br>I know that you don't like people passing on
junk but I just got this in my inbox and I feel that it hit the nail on the
head about including shortcodes in themes.<br><br>Enjoy :)<br><br>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Theme Lab</b> <span dir="ltr"><<a href="mailto:leland@themelab.com" target="_blank">leland@themelab.com</a>></span><br>
Date: Sun, Jul 14, 2013 at
10:18 AM<br>Subject: Theme Lab<br>To: <br><br><br><u></u>
<div>
<div style="LINE-HEIGHT:140%;MARGIN:0px 2em;FONT-FAMILY:georgia,helvetica,arial,sans-serif;FONT-SIZE:13px">
<table style="border-right:0px;padding-right:0px;padding-left:0px;padding-top:0px;width:100%;border-bottom:0px;margin:0px;border-top:0px;padding-bottom:0px;border-left:0px">
<tbody>
<tr>
<td style="VERTICAL-ALIGN:top" width="99%">
<h1 style="PADDING-BOTTOM:6px;MARGIN:0px"><a style="FONT-FAMILY:arial,helvetica,sans-serif;COLOR:#888;FONT-SIZE:22px;FONT-WEIGHT:normal;TEXT-DECORATION:none" title="(http://www.themelab.com)" href="http://www.themelab.com" target="_blank">Theme Lab</a> </h1>
</td>
<td width="1%"><a href="http://www.themelab.com" target="_blank"><img style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;PADDING-BOTTOM:10px;PADDING-LEFT:3px;PADDING-RIGHT:0px;BORDER-TOP:0px;BORDER-RIGHT:0px;PADDING-TOP:0px" alt="Link to Theme Lab"> </a></td>
</tr></tbody></table>
<hr style="BORDER-BOTTOM:#ccc 1px solid;BORDER-LEFT:#ccc 1px solid;PADDING-BOTTOM:0px;MARGIN:0px;PADDING-LEFT:0px;PADDING-RIGHT:0px;BORDER-TOP:#ccc 1px solid;BORDER-RIGHT:#ccc 1px solid;PADDING-TOP:0px">
<table style>
<tbody>
<tr>
<td style="LINE-HEIGHT:1.4em;MARGIN-BOTTOM:0px">
<p style="MARGIN:1em 0px 3px"><a style="FONT-FAMILY:arial,helvetica,sans-serif;FONT-SIZE:18px" href="http://www.themelab.com/2013/07/13/put-shortcodes-in-a-plugin/" name="13fdad160229ece8_13fdaa15eff5a0dc_13fda8ae8947dbb9_1" target="_blank">Shortcodes Should
Never Be Included With Themes. Period.</a> </p>
<p style="LINE-HEIGHT:140%;MARGIN:9px 0px 3px;FONT-FAMILY:georgia,helvetica,arial,sans-serif;COLOR:#555;FONT-SIZE:13px"><span>Posted:</span>
13 Jul 2013 12:28 PM PDT</p>
<div style="LINE-HEIGHT:140%;MARGIN:0px;FONT-FAMILY:georgia,helvetica,arial,sans-serif;FONT-SIZE:13px">
<p>ThemeForest <a href="http://notes.envato.com/news/announcement-wordpress-theme-submission-requirements/" target="_blank">recently</a> updated their <a href="http://support.envato.com/index.php?/Knowledgebase/Article/View/472/85/wordpress-theme-submission-requirements" target="_blank">WordPress theme submission requirements</a> to be more
stringent and more inline with WordPress theme development best
practices.</p>
<p>The guidelines require the use several of WordPress’ core features,
standard theme hooks, and disallow PHP functions (like base64 and fopen)
that really <b>shouldn’t have ever had any place in a WordPress
theme</b> to begin with.</p>
<p>Basically, pretty much WordPress.org’s <a href="http://codex.wordpress.org/Theme_Review" target="_blank">Theme
Review policy</a>, give or take a few things.</p>
<p>Overall, it’s a step in the right direction and moves to <b>promote
best practices on one of the most popular WordPress theme
marketplaces</b> on the net. There’s just one problem…</p>
<h3>Admissible Shortcodes</h3>
<p>One thing that particularly caught my eye, however, was how
<b>certain “admissible” shortcode functionality was allowed</b> (i.e. by
directly including them through the theme’s <code>functions.php</code>
file). The ones listed as “admissible” included the following:</p>
<ul>
<li>buttons
</li><li>pricing tables
</li><li>image containers
</li><li>dropcaps
</li><li>lists </li></ul>
<p>Inadmissible shortcodes include: maps, accordions and toggles, boxed
contents, column, contact forms, charts.</p>
<h3>The Problem with Shortcodes in Themes</h3>
<p>I can’t really put it better than <a title="Dealing with shortcode madness" href="http://justintadlock.com/archives/2011/05/02/dealing-with-shortcode-madness" target="_blank">Justin Tadlock already has</a>. One of the most noticeable
issues, is that when a user changes themes, the <b>shortcodes will no
longer be parsed</b>.</p>
<p>Let’s say “Super Awesome” theme had a shortcode feature that would
output a big green button with a link when you typed out something like
<code>[button url="<a href="http://example.com" target="_blank">http://example.com</a>"]Big Green
Button[/button]</code>.</p>
<p><a style="TEXT-ALIGN:center;PADDING-BOTTOM:20px;LINE-HEIGHT:50px;PADDING-LEFT:20px;PADDING-RIGHT:20px;DISPLAY:inline-block;BACKGROUND:green;COLOR:white;FONT-SIZE:50px;PADDING-TOP:20px" title="This link goes nowhere" href="#13fdad160229ece8_13fdaa15eff5a0dc_13fda8ae8947dbb9_">Big Green Button</a></p>
<p>When you switch to another theme (let’s face it, people get bored of
themes easily), there’s no more big green button. Instead, <b>you see
the unparsed shortcode in the post</b> as if it were any other piece of
content, like this:</p>
<p>[button url="<a href="http://example.com" target="_blank">http://example.com</a>"]Big Green Button[/button]</p>
<p>It looks ugly, confusing, and out-of-place, and it’s a <b>pain for
the user to go back and remove/replace</b> all of them.</p>
<h3>The Other Problem with Shortcodes in Themes</h3>
<p>Something that Tadlock went over in his “Dealing with shortcode
madness” article is, a lot of shortcodes are so simple and HTML-like, it
might even be best to instruct users to write out a little (*gasp*)
<b>real HTML code</b>.</p>
<p>The same <code>[button url="<a href="http://example.com" target="_blank">http://example.com</a>"]Button Text[/button]</code>
shortcode in my example above could be <b>easily rewritten</b> as
something like:</p>
<p><code><a href="<a href="http://example.com" target="_blank">http://example.com</a>" class="button">Button text
here</a></code></p>
<p>While there may not be CSS code styling the <code>.button</code>
selector in a new theme, at least a normal link will show up. <b>Which
is a big improvement</b> over an unparsed <code>[button]</code>
shortcode showing up in a post’s content.</p>
<p>Plus, I believe every WordPress user <b>should have at least some
basic understanding of HTML code</b>. By teaching them, even in little
bits (like how to construct a link), will help. If they can understand a
shortcode, it won’t take much more to get them to understand basic
HTML.</p>
<h3>But The Users Don’t Care!</h3>
<p>A common argument I see defending all sorts of bad practices when it
comes to theme development is that the users simply <i>don’t care</i>. I
mean, maybe they never want to update their theme, in which case, this
<b>shortcode issue would be a moot point</b>.</p>
<p>The problem is, some users <b>inevitably will want to switch
themes</b> some day. Some users will want to install a plugin that might
conflict with some other poorly-thought-out code in a theme.</p>
<p>Then, they probably will care, and probably will wonder if the theme
they bought with 100s of built-in shortcodes and other <b>superfluous
features was really worth it</b>.</p>
<h3>The Right Way to Include Shortcodes</h3>
<p>Put it in a plugin. A really simple plugin. It doesn’t need a
separate options panel. <b>Just literally copy and paste</b> whatever
you were going to include via your theme’s functions.php file, and <a href="https://codex.wordpress.org/Writing_a_Plugin" target="_blank">put it
in a plugin</a> instead.</p>
<p>It could even be bundled with something like <a href="http://tgmpluginactivation.com/" target="_blank">TGM Plugin
Activation</a> to make it required on theme activation. Or not. A
<b>theme is still a theme without shortcodes</b>.</p>
<p>This way, if the user changes themes, the <b>shortcodes will still
work</b>, because that functionality is handled by the plugin that is
still active.</p>
<p>Maybe the plugin could also <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_style" target="_blank">enqueue styles</a> for the shortcodes as well. This way,
the big green buttons you included with the [button] shortcode will
still be big green buttons, regardless of the theme used.</p>
<h3>Why Did ThemeForest Allow “Admissible” Shortcodes?</h3>
<p>It’s hard to say what exactly the reasoning behind this decision was.
Japh Thomson, a WordPress evangelist at Envato (ThemeForest’s parent
company) had this to say about it <a href="http://wpmu.org/themeforest-developer-guidelines/#comment-143884" target="_blank">in a comment on WPMU.org</a>:</p>
<blockquote>
<p>Complex shortcode functionality really should reside in a plugin,
not a theme. It also just makes sense when you consider most of our
authors have multiple themes.</p></blockquote>
<p>Obviously, he gets it. So it’s a <b>mystery to me why there would be
any “admissible” shortcodes</b> at all. And yes, I realize he used the
word “complex” in the quote above, and the admissible shortcodes do tend
to be pretty simple ones (dropcaps, lists, etc.).</p>
<p>Simple as a shortcode may be, the <b>problems I outlined above will
still exist</b>. ThemeForest has shown to be responsive to community
feedback, so it’s possible this rule is amended in the future.</p>
<h3>Conclusion</h3>
<p>I realize this post <b>seems a bit nit-picky</b>, and these new
guidelines are definitely a huge step in the right direction. But
there’s really no reason any shortcode should be allowed in a theme,
simple or not.</p>
<p style="TEXT-ALIGN:center"></p>
<blockquote>
<p>Can you think of a situation when a publicly released theme
absolutely needs to include shortcode functionality via its own
functions.php?</p>
<p>— Theme Lab (@themelab) <a href="https://twitter.com/themelab/statuses/354662109273001984" target="_blank">July 9, 2013</a></p></blockquote>
<p><b>Spoiler alert:</b> Didn’t get any responses to that tweet with a
real example of a shortcode absolutely needing to be included in a
publicly-released theme.</p>
<p>That’s because it’s <b>just not user-friendly</b> for a user to go
back and replace hundreds of button shortcodes after they switched to a
theme that doesn’t have the exact same shortcode support.</p>
<p>Related posts:</p>
<ol>
<li><a title="Permanent Link: Why WordPress Widgets Vanish When Migrating to New URL" href="http://www.themelab.com/2013/07/06/why-wordpress-widgets-disappear/" rel="bookmark" target="_blank">Why WordPress Widgets Vanish When Migrating
to New URL</a>
</li><li><a title="Permanent Link: Want More Retweets? Use the Official Tweet Button" href="http://www.themelab.com/2010/08/16/use-the-official-tweet-button/" rel="bookmark" target="_blank">Want More Retweets? Use the Official Tweet
Button</a>
</li><li><a title="Permanent Link: Dear Theme Devs, Stop Pasting Random Snippets of Code in functions.php" href="http://www.themelab.com/2011/01/21/theme-devs-random-snippets/" rel="bookmark" target="_blank">Dear Theme Devs, Stop Pasting Random
Snippets of Code in functions.php</a> </li></ol>
<div><a href="http://feeds.feedburner.com/%7Eff/ThemeLab?a=p1T3HwxtCQk:9_BjVYpP3LU:hJo_UCMZ9e0" target="_blank"><img border="0"></a> <a href="http://feeds.feedburner.com/%7Eff/ThemeLab?a=p1T3HwxtCQk:9_BjVYpP3LU:D7DqB2pKExk" target="_blank"><img border="0"></a> <a href="http://feeds.feedburner.com/%7Eff/ThemeLab?a=p1T3HwxtCQk:9_BjVYpP3LU:F7zBnMyn0Lo" target="_blank"><img border="0"></a> <a href="http://feeds.feedburner.com/%7Eff/ThemeLab?a=p1T3HwxtCQk:9_BjVYpP3LU:yIl2AUoC8zA" target="_blank"><img border="0"></a> <a href="http://feeds.feedburner.com/%7Eff/ThemeLab?a=p1T3HwxtCQk:9_BjVYpP3LU:3Nb2VdUv6vk" target="_blank"><img border="0"></a> </div>
</div></td></tr></tbody></table>
<table style="padding-top:4px;width:100%;margin-top:1.5em;border-top:#999 1px solid">
<tbody>
<tr>
<td style="TEXT-ALIGN:left;MARGIN:0px 6px 1.2em 0px;FONT-FAMILY:helvetica,arial,sans-serif;COLOR:#333;FONT-SIZE:11px">You
are subscribed to email updates from <a href="http://www.themelab.com" target="_blank">Theme Lab</a> <br>To stop receiving these emails, you
may</td>
<td style="TEXT-ALIGN:right;MARGIN:0px 6px 1.2em 0px;FONT-FAMILY:helvetica,arial,sans-serif;COLOR:#333;FONT-SIZE:11px;VERTICAL-ALIGN:top">Email
delivery powered by Google</td></tr>
<tr>
<td style="TEXT-ALIGN:left;MARGIN:0px 6px 1.2em 0px;FONT-FAMILY:helvetica,arial,sans-serif;COLOR:#333;FONT-SIZE:11px" colspan="2">Google Inc., 20 West Kinzie, Chicago IL USA
60610</td></tr></tbody></table></div></div></div><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></blockquote></div>
<div> </div></div>
</div></div><p>
</p><hr><div class="im">
_______________________________________________<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><p></p></div></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></div>