<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<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"
class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile"
src="cid:EA4BD49E1E704931AAE17B5C5A93BF99@furious"> /grin</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=chip@chipbennett.net
href="mailto:chip@chipbennett.net">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">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-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<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-BOTTOM: 0px; BORDER-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; COLOR: #000000; BORDER-TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 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="COLOR: #000000">
<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=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>pricing tables
<LI>image containers
<LI>dropcaps
<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="#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><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><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="MARGIN-TOP: 1.5em; WIDTH: 100%; COLOR: #000000; BORDER-TOP: #999 1px solid; PADDING-TOP: 4px">
<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">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>
<P>
<HR>
_______________________________________________<BR>theme-reviewers mailing
list<BR>theme-reviewers@lists.wordpress.org<BR>http://lists.wordpress.org/mailman/listinfo/theme-reviewers<BR></DIV></DIV></DIV></BODY></HTML>