<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Justin Tadlock &#187; WordPress Discussion</title>
	<atom:link href="http://justintadlock.com/tags/wordpress-discussion/feed" rel="self" type="application/rss+xml" />
	<link>http://justintadlock.com</link>
	<description>Life, Blogging, and WordPress</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:39:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>One multi-task plugin vs. several single-task plugins?</title>
		<link>http://justintadlock.com/archives/2012/01/21/one-massive-plugin-vs-several-mini-plugins</link>
		<comments>http://justintadlock.com/archives/2012/01/21/one-massive-plugin-vs-several-mini-plugins#comments</comments>
		<pubDate>Sat, 21 Jan 2012 14:57:47 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=4447</guid>
		<description><![CDATA[Would you rather use larger plugins with multiple functions or smaller plugins that handle single tasks?]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve been giving a lot of thought to the debate over whether it&#8217;s better to develop larger plugins that handle many related tasks or smaller, mini-plugins that handle extremely specific tasks.  There&#8217;s merit to both arguments, but I wanted to give my readers a chance to discuss this and help me come to a decision about how I developer some of my future plugins.</p>
<p>The biggest reason for this article is that I&#8217;ve been trying to make a final decision on how one (or multiple as the case may be) of my plugins will be developed.  Other plugin developers might also find this discussion useful in helping them make decisions.</p>
<h2>The example plugin</h2>
<p>I want you to have an example of what I&#8217;m asking you to discuss, so I&#8217;ll give you a few details on the plugin(s) I&#8217;m developing.  It is a set of extensions to how comments are handled in WordPress.  Some of these extensions include:</p>
<ul>
<li>Moderate all non-Enlish comments.</li>
<li>Automatically delete spam on a schedule.</li>
<li>Turn on/off comments for specific post types by default (like with posts).</li>
<li>Moderate all trackbacks and pingbacks.</li>
<li>And more.</li>
</ul>
<p>The plugin currently has several options like the above.  Basically, it&#8217;s just an extension to the &#8220;Discussion Settings&#8221; page in the WordPress admin.  It&#8217;s easy to see how some users might only want to use one or two of those settings rather than all of them.</p>
<h2>Advantages of a single, multi-task plugin</h2>
<p>The following is a list of some of the advantages to running a single plugin:</p>
<ul>
<li>You only have to run one plugin.  Many people live in fear of running &#8220;too many plugins&#8221; because it might somehow break their site.  Realistically, running too many large or poorly-coded plugins would be more of a problem.  While you can&#8217;t really have too many plugins, this fear from users is something to consider.</li>
<li>Fewer things to manage.  No one likes to update plugins every day.  The more plugins you have, the more likely you&#8217;ll have to update them frequently.  Having to only update a single plugin instead of several is easier.</li>
<li>Fewer translation files.  Translators would only have to update and maintain a single translation file for one plugin as opposed to multiple translations for multiple plugins.</li>
</ul>
<h2>Advantages of multiple, single-task plugins</h2>
<p>The list below is some of the advantages of using several plugins.</p>
<ul>
<li>You don&#8217;t have to load code you don&#8217;t need.  Using mini plugins means that you only have to load and run code that you absolutely want.  With a single plugin, there may be several parts of the plugin that you don&#8217;t want to use.</li>
<li>There&#8217;s generally fewer bugs.  Less code in a plugin means there&#8217;s less chance of bugs arising.  It also makes it easier to find and fix bugs more quickly.  Thus, allowing plugin developers to quickly get out new releases when they&#8217;re needed.</li>
<li>Fewer database options.  With multiple plugins, sometimes you don&#8217;t need an option at all.  The plugin simply works.  With a single, large plugin, each setting might need to be enabled/disabled.</li>
</ul>
<h2>What are your thoughts?</h2>
<p>Think about the example plugin I mentioned early in the post.  If I allowed you to make the final decision on whether you&#8217;d like to see this developed as a single plugin or multiple plugins, which would you choose?</p>
<p>Now, think about the plugins you currently have installed on your site.  Are there some that you&#8217;d like to see broken down into smaller plugins that only handled specific tasks?</p>
<p>Are there any other advantages or disadvantages you&#8217;d like to share?</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2012/01/21/one-massive-plugin-vs-several-mini-plugins/feed</wfw:commentRss>
		<slash:comments>73</slash:comments>
		</item>
		<item>
		<title>A better way for plugins to hook into theme templates</title>
		<link>http://justintadlock.com/archives/2011/09/01/a-better-way-for-plugins-to-hook-into-theme-templates</link>
		<comments>http://justintadlock.com/archives/2011/09/01/a-better-way-for-plugins-to-hook-into-theme-templates#comments</comments>
		<pubDate>Thu, 01 Sep 2011 21:32:07 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://devpress.com/?p=3541</guid>
		<description><![CDATA[A potential solution for plugins including content within theme templates.]]></description>
			<content:encoded><![CDATA[<p>An <a href="http://core.trac.wordpress.org/ticket/18561" title="Better way to insert things below individual posts">interesting discussion</a> has popped up on WordPress Trac about making it easier for plugins to insert content before/after the post is displayed.</p>
<p>Currently, plugins add features to the <code>the_content</code> hook, which is problematic.  Some of these things are sharing icons, related posts, author bio boxes, and much more.  The problem is this tends to get rather ugly, especially with some theme designs.  Most of the time, the things that plugins add are shown before the post meta or pagination links when using multi-paged posts.</p>
<p>This issue has been around for years.  I&#8217;m happy that there&#8217;s at least a discussion happening about ways to overcome it.  If you&#8217;re a theme developer, I encourage you jump in if you have a fresh idea.</p>
<p>I wanted to take this discussion to another level though by fully explaining and further refining my <a href="http://core.trac.wordpress.org/ticket/18561#comment:48">comment on the discussion</a> and why it will work for this situation as well as similar situations in the future.  Since some of this isn&#8217;t directly related to the ticket, I wanted to kick start a discussion on the overall problem.</p>
<h2>The problem</h2>
<p>Right now, plugins only have a few places where they can reliably hook content into themes.  Sometimes, the hooks that are available aren&#8217;t ideal for the scenario.  The problem is that WordPress can&#8217;t simply introduce a ton of new hooks for themes to start using because it takes a long time for standards to form.  </p>
<p>Themes are also vastly different from one another.  Therefore, it&#8217;s hard to standardize some things while also allowing complete flexibility.  Some things, such as displaying a post, all themes must do, so there are some areas that are easier to standardize upon than others.</p>
<h2>A solution for themes</h2>
<p>Assuming something is decided upon and hooks are added before/after a post is displayed, what happens when we run into this problem later with another area?  My solution seeks to handle this too.</p>
<p>The idea is that WordPress would have some predefined &#8220;template hooks&#8221; that themes are strongly recommended to use, at least until they eventually become a standard.  Themes would need to register support for this feature and choose the hooks their templates support.</p>
<p>Suppose the first two hooks are the aforementioned before/after post hooks.  Themes would simply add this to their <code>functions.php</code> to register support for these hooks:</p>
<pre><code>add_theme_support( 'template-hooks', array( 'before_post', 'after_post' ) );</code></pre>
<p>In the theme templates, such as <code>index.php</code>, the theme would simply have something like the following.</p>
<pre><code>&lt;?php do_action( 'before_post' ); ?>

Post stuff would go here.

&lt;?php do_action( 'after_post' ); ?></code></pre>
<p>This method would solve the immediate problem with before/after post hooks to some degree as well as provide a method if we need additional template hooks in the future.</p>
<p>If you don&#8217;t like the idea of theme authors dropping <code>do_action()</code> into their theme templates, accompanying template tags such as <code>before_post()</code> and <code>after_post()</code> can be easily arranged.</p>
<h2>A solution for plugins</h2>
<p>If themes were using this proposed method, plugins would be able to easily check if a theme supported a certain hook and fall back to something else if not.</p>
<p>Sticking with the before/after post hooks, a plugin would need something similar to the following code to add content to the post area.</p>
<pre><code>if ( current_theme_supports( 'template-hooks' ) )
	$hooks = get_theme_support( 'template-hooks' );

if ( isset( $hooks ) &#038;&#038; in_array( 'after_post', $hooks[0] ) )
	add_action( 'after_post', 'example_plugin_function' );
else
	add_filter( 'the_content', 'example_plugin_function' );</code></pre>
<h2>Is this an ideal solution?</h2>
<p>Probably not.  There&#8217;s not perfect solution for this situation.  It&#8217;s something that will need to be widely adopted and might take a while to work.  Whatever solution is decided on will leave plugin authors doing <code>if</code>/<code>else</code> checks in their code.</p>
<p>Another benefit (or problem) with my solution is that we don&#8217;t need to change code in WordPress core for it to work.  Themes and plugins can actually take advantage of this now.</p>
<p>There are tons of ideas right now.  Do you like my proposed method?  Or, do you have a better solution?</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2011/09/01/a-better-way-for-plugins-to-hook-into-theme-templates/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dealing with shortcode madness</title>
		<link>http://justintadlock.com/archives/2011/05/02/dealing-with-shortcode-madness</link>
		<comments>http://justintadlock.com/archives/2011/05/02/dealing-with-shortcode-madness#comments</comments>
		<pubDate>Mon, 02 May 2011 20:22:24 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=3050</guid>
		<description><![CDATA[How theme developers are hurting the WordPress community by bundling shortcodes that replace basic <abbr title="Hypertext Markup Language">HTML</abbr>.]]></description>
			<content:encoded><![CDATA[<p>At some point in the past year, a disturbing movement has been growing in the WordPress theme development community.  If you&#8217;ve ever looked at a few themes from <a href="http://themeforest.com" title="Theme Forest">Theme Forest</a>, you might have noticed this horrible trend.  This isn&#8217;t just a Theme Forest issue though; it&#8217;s a problem that&#8217;s growing in the theme development community and must be eradicated.</p>
<p>Theme developers, please stop bundling shortcodes in your themes that replace basic <abbr title="Hypertext Markup Language">HTML</abbr>.</p>
<p>I seriously doubt the <a href="http://codex.wordpress.org/Shortcode_API" title="WordPress Codex: Shortcode API">Shortcode API</a> in WordPress was built to do things like this.  I also propose that using shortcodes in this manner is hurting the theme development community, hindering users&#8217; ability to learn, and creating long term issues that cannot be easily fixed.</p>
<h2>An example shortcode</h2>
<p>To provide a model in which to present my argument, I&#8217;ve created an example shortcode called <code>[note]</code>.  There are many shortcodes like it, but I&#8217;ll use this as the basis of this discussion.  Its purpose is to highlight some text to make it stand out from a post&#8217;s normal content.</p>
<p>To use this shortcode, I created some example text in my development install and wrapped it with opening <code>[note]</code> and closing <code>[/note]</code> shortcode tags.  In the post editor, it looks like the following:</p>
<pre><code>[note]Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye.[/note]</code></pre>
<p>That looks eerily similar to something something else many other people use around the Web:  <abbr title="Hypertext Markup Language">HTML</abbr>.  I&#8217;ll get to that shortly though.</p>
<p>The following screenshot is what the content looks like when the post is viewed on the front end:</p>
<p><img src="http://justintadlock.com/blog/wp-content/uploads/2011/05/note-shortcode.png" alt="Note shortcode screenshot" title="Example shortcode screenshot" width="600" height="323" class="aligncenter size-full wp-image-3051" /></p>
<p>This seems like a brilliant idea.  Users wrap some text in a simple-to-use shortcode called <code>[note]</code> and magic happens!  They have a cool new design for their text.  <em>What could possibly be wrong with that?</em></p>
<h2>Problem #1:  The &#8220;lock in&#8221; effect</h2>
<p>Users, here&#8217;s what theme developers are not telling you:  <strong>By using their theme&#8217;s shortcodes, they are essentially locking you into using their themes forever</strong>.</p>
<p>Let&#8217;s take a look at what happens when I switch to another theme that doesn&#8217;t have the <code>[note]</code> shortcode.  The following screenshot is what the text will look like on the front end of the site.</p>
<p><img src="http://justintadlock.com/blog/wp-content/uploads/2011/05/shortcode-note-problem.png" alt="An unrendered shortcode" title="Example shortcode not rendering" width="600" height="276" class="aligncenter size-full wp-image-3056" /></p>
<p>As you can see, the pretty design for the text is gone and ugly shortcodes are left within the post content.  It&#8217;s simple enough to delete those shortcodes in a handful of posts, but it&#8217;s a huge problem when users have 100s of posts that use this shortcode.  </p>
<p>Users either have to figure out a solution to this problem or stick with using the theme.  Niether of those options are user friendly.</p>
<h2>Problem #2:  Replacing basic <abbr title="Hypertext Markup Language">HTML</abbr></h2>
<p><abbr title="Hypertext Markup Language">HTML</abbr> and <abbr title="Cascading Style Sheets">CSS</abbr> are not hard to learn, especially for something as basic as this.  Rather than defining shortcodes, theme developers should define <abbr title="Cascading Style Sheets">CSS</abbr> classes for users to use within their posts.  There are several benefits to doing this:</p>
<ul>
<li>No &#8220;lock in&#8221; effect as described earlier.</li>
<li>Provide a way for users to learn some of the basic tools of the Web.</li>
<li>Allow various elements to use a class, making for more semantic markup.</li>
<li>No <abbr title="Hypertext Preprocessor">PHP</abbr> required to create useless shortcodes.</li>
</ul>
<p>Instead of the <code>[note]</code> shortcode, create a <code>.note</code> class and drop some simple <abbr title="Cascading Style Sheets">CSS</abbr> in your theme&#8217;s <code>style.css</code> file.  The following is all the code it takes to create a &#8220;note&#8221; box:</p>
<pre><code>.note {
	padding: 25px;
	font: normal normal bold 13px/25px Arial, Verdana, sans-serif;
	color: #0a5e7a;
	border-top: 1px solid #5ea6bd;
	border-bottom: 1px solid #5ea6bd;
	}</code></pre>
<p>Here&#8217;s the great thing:  you can use this with any <abbr title="Hypertext Markup Language">HTML</abbr> element your heart desires (e.g., paragraphs, lists, headers).  The following is just a few example uses of the <code>.note</code> class within the post editor.</p>
<pre><code>&lt;p class="note">This is an example paragraph.&lt;/p>

&lt;h2 class="note">This is an example header&lt;/h2>

&lt;div class="note">This is an example box you can add several elements within.&lt;/div></code></pre>
<p>I have to believe that anyone smart enough to use WordPress has the capacity to learn how to use the <code>class</code> attribute within an <abbr title="Hypertext Markup Language">HTML</abbr> element.  It&#8217;s possible that I&#8217;m wrong, but I have a lot of faith in my fellow WordPress users.</p>
<h2>The counter-argument</h2>
<p>The only possible argument I can think that theme developers can give is that it&#8217;s easier for users to figure out shortcodes than basic <abbr title="Hypertext Markup Language">HTML</abbr>.  It&#8217;s a stretch, but I&#8217;ll allow the argument.</p>
<p>Let&#8217;s suppose <code>[note]</code> is easier to use than <code>&lt;p class="note"></code>.  Maybe there&#8217;s something inherently easier about using a <code>[</code> and <code>]</code> than <code>&lt;</code> and <code>&gt;</code>.  Maybe the latter scares some folks off.</p>
<p>Assuming this argument has any validity, there&#8217;s still the problem of the &#8220;lock in&#8221; effect.  The easiest solution to this problem is to create a plugin so that users can carry their shortcodes with them from theme to theme.</p>
<p>If you create a theme with custom shortcodes, do your users a favor and create a plugin that allows them to use their shortcodes even when they switch themes.  Or, better yet, someone please create a massive plugin with all the known <abbr title="Hypertext Markup Language">HTML</abbr>-replacement shortcodes and end this madness.</p>
<h2>Seeing an end to the problem</h2>
<p>I previously wrote about this issue in the <a href="http://wpcandy.com/presents/the-future-of-wordpress-themes-in-2011" title="The future of WordPress themes in 2011">WPCandy&#8217;s 2011 theme predictions</a> article.  My fear is that this discussion will fall on many deaf ears and the trend will continue.</p>
<p>So, I have a promise to make.  I will personally write the required <abbr title="Cascading Style Sheets">CSS</abbr> and fix this shortcode problem for any user that signs up for a support membership at <a href="http://themehybrid.com" title="Theme Hybrid">Theme Hybrid</a>.  I will never lock you into using only my themes and will provide a way around problems like this.  I encourage other theme developers to take similar steps.</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2011/05/02/dealing-with-shortcode-madness/feed</wfw:commentRss>
		<slash:comments>158</slash:comments>
		</item>
		<item>
		<title>Predictions on WordPress themes in 2011</title>
		<link>http://justintadlock.com/archives/2011/01/19/predictions-on-wordpress-themes-in-2011</link>
		<comments>http://justintadlock.com/archives/2011/01/19/predictions-on-wordpress-themes-in-2011#comments</comments>
		<pubDate>Wed, 19 Jan 2011 20:07:44 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=2658</guid>
		<description><![CDATA[Several developers and community members predict what the future holds for WordPress themes in 2011. You can find my predictions mixed in with the bunch.]]></description>
			<content:encoded><![CDATA[<p>Several developers and community members predict what the future holds for <a href="http://wpcandy.com/presents/the-future-of-wordpress-themes-in-2011" title="The future of WordPress themes in 2011">WordPress themes in 2011</a>.  You can find my predictions mixed in with the bunch.</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2011/01/19/predictions-on-wordpress-themes-in-2011/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Rethinking how news themes work</title>
		<link>http://justintadlock.com/archives/2011/01/14/rethinking-how-news-themes-work</link>
		<comments>http://justintadlock.com/archives/2011/01/14/rethinking-how-news-themes-work#comments</comments>
		<pubDate>Fri, 14 Jan 2011 19:00:03 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=2643</guid>
		<description><![CDATA[Using a custom taxonomy rather than a theme settings page to handle the front page for WordPress news themes.]]></description>
			<content:encoded><![CDATA[<p>As I was working through the post and taxonomy chapter in <a href="http://www.amazon.com/gp/product/0470916222?ie=UTF8&amp;tag=justtadl-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470916222" title="Buy 'Professional WordPress Plugin Development' from Amazon.com">Professional WordPress Plugin Development</a> and checking out the new post formats feature for WordPress, a light bulb turned on in my head.  I wanted to change how we think about news themes.</p>
<p>One of the things I hate the most about news or magazine themes for WordPress are their extensive options pages to handle the front page of the site.  I&#8217;ve always thought this could be more flexible and more intuitive for the end user.</p>
<p>The idea is to use a custom taxonomy to handle the display of things on the front page of the site.</p>
<h2>A typical news theme layout</h2>
<p>Before getting any deeper into this subject, take a look at the following image.  It is an example of what the front page of a news theme might look like.  I&#8217;ll use this as an example throughout the rest of the article.</p>
<p><img src="http://justintadlock.com/blog/wp-content/uploads/2011/01/front-page-news-areas.png" alt="Front Pages News Areas" title="Example of a front page of a news theme" width="600" height="420" class="aligncenter size-full wp-image-2645" /></p>
<h2>The current state of news themes</h2>
<p>In the image from the previous section, there are three front page areas: feature, images, and column.  Generally, news themes have a settings page that allows you to select a category to display posts in specific areas on the front page.  So, you would most likely select a category for each of those sections.</p>
<p>What this means is that you typically have to create a &#8220;feature&#8221; category to handle your featured posts and maybe even create new categories for the other sections.  Other themes just have variations of this basic idea.</p>
<p>This is poor design and doesn&#8217;t make for a great user experience.  It doesn&#8217;t put the power in the user&#8217;s hands.</p>
<h2>Using a taxonomy instead of a settings page</h2>
<p>Rather than having a settings page to control which categories and so on fit within certain blocks on the front page, consider using a custom taxonomy.  This way, the user can select where a post would appear while writing the post itself.  This seems to make more sense from the user&#8217;s perspective.  And, it doesn&#8217;t force users to use categories to determine how their site content is displayed.</p>
<p>The following screenshot is an example of what this could look like on the post editing screen.</p>
<p><img src="http://justintadlock.com/blog/wp-content/uploads/2011/01/news-theme-taxonomy.png" alt="Custom taxonomy for news themes" title="News theme taxonomy selector" width="600" height="401" class="aligncenter size-full wp-image-2646" /></p>
<p>You could even make this custom taxonomy public, allowing for featured post archives, nav menu items, and so on.  There&#8217;s plenty of room for innovation in this area.</p>
<h2>What do you think?</h2>
<p>If you&#8217;re an end user, does this type of system make more sense to you?  Or, do you prefer a theme settings page in which you must select a specific category to handle the display of the front page?</p>
<p>As a theme developer, do you think this system would work better?  If so, what types of areas do you think would be standard in news themes (I&#8217;d like to come up with a good default list)?</p>
<p>I welcome alternative ideas too.  I haven&#8217;t seen a whole lot of innovation in this area in the past couple of years.</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2011/01/14/rethinking-how-news-themes-work/feed</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
		<item>
		<title>Frameworks? Parent, child, and grandchild themes?</title>
		<link>http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-and-grandchild-themes</link>
		<comments>http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-and-grandchild-themes#comments</comments>
		<pubDate>Mon, 16 Aug 2010 17:05:49 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=2517</guid>
		<description><![CDATA[Solving the big mystery of parent, child, and grandchild themes by explaining what theme frameworks really are.]]></description>
			<content:encoded><![CDATA[<p>One question that crops up every once in a while from my theme users is how to create a WordPress grandchild theme.  Most of the time, a user asks, &#8220;How do I update my child theme?  Do I need to create a grandchild theme?&#8221;</p>
<p>The idea of parent/child themes became popular because it allowed the parent theme to be updated while keeping customizations intact within a child theme.  That system works great.  The problems begin when a child theme is updated.  Users tend to want to take advantage of the update, but they can&#8217;t upgrade because they&#8217;ve made customizations. </p>
<p>Essentially, we&#8217;ve just added another layer to the preexisting problem.</p>
<p>But, that&#8217;s not where the <em>real</em> problem is at.  The problem is confusion over what frameworks, parent themes, and child themes are.  Users aren&#8217;t to blame for this confusion.  Theme developers are at fault here (even me), and I&#8217;m going to attempt to clear things up.</p>
<h2>Advanced parent themes are not frameworks</h2>
<p>I&#8217;m going to avoid calling any other &#8220;framework&#8221; themes out and tell you that my own <a href="http://themehybrid.com/themes/hybrid" title="Hybrid WordPress theme">Hybrid theme</a> is not a framework, at least not in the traditional development framework sense.  It&#8217;s an advanced parent theme.  Admittedly, I&#8217;ve called it a &#8220;framework&#8221; before because I&#8217;ve just been following the crowd.</p>
<p>What should we call the <em>Hybrid</em> theme?  Simple.  It&#8217;s a parent theme.</p>
<p>One thing we should definitely not confuse are the terms &#8220;framework&#8221; and &#8220;parent theme.&#8221;  These two are not interchangeable.  That&#8217;s where a lot of the confusion stems from.</p>
<h2>What is a theme framework?</h2>
<p class="note">This is the question I most wanted to answer because I&#8217;ll be releasing a framework for theme developers soon (see below).  But, I can&#8217;t do that with all this confusion floating around the community.</p>
<p>A theme framework is a set of conventions to use for developing WordPress [parent] themes.</p>
<p>Yes, that&#8217;s a bit vague, but frameworks can exist for all kinds of different purposes.  This can be something like an elegant template engine (<a href="http://carringtontheme.com/" title="Carrington Theme Framework">Carrington Core</a> is really good for this) or a set of helper functions for more quickly building a theme.</p>
<p>It is not a theme though.  You can&#8217;t simply drop it in your WordPress themes directory and expect it to work.</p>
<p>Frameworks are for theme developers.  They offer a set of standards (or whatever features) for theme developers to use in creating their own themes.  They&#8217;re a set of functions/features created to aid development.</p>
<h2>What is a parent theme?</h2>
<p>Nearly all WordPress themes are parent themes.  Only those called &#8220;child themes&#8221; are not parent themes.</p>
<p>Theme developers create parent themes for users to download and install on their sites.  My <em>Hybrid</em> theme is, without a doubt, a parent theme.  Parent themes should house the theme design, functionality, and the templates required for running the theme in WordPress.</p>
<p>You can use a framework to build a parent theme, but the framework is not a parent theme itself.</p>
<h2>What is a child theme?</h2>
<p>A child theme is something users should be creating so that they can customize the look and functionality of their site.  The child theme inherits all of its functionality from a single parent theme.</p>
<p>When a theme developer creates a child theme, things become problematic because that child theme might eventually need an update.  If you&#8217;re a theme developer and are building a child theme with a 20kb functions file and five or six custom templates, I can assure you that you&#8217;re doing it wrong.  I&#8217;ve even had to tell myself this.</p>
<p>What you should really be creating is a parent theme.  Child themes from theme developers should be nothing more than a stylesheet and a few functions.  This idea of releasing advanced child themes just creates the same problem child themes were meant to solve: <em>upgradability</em>.</p>
<p>I&#8217;ve got over two years of experience at this point in dealing with parent/child themes if you need a reason to take my advice on this.</p>
<h2>How frameworks work</h2>
<p><em>Confused yet?</em>  Let me break this process down for you and explain how it <em>should</em> work.</p>
<ul>
<li>Frameworks come packaged within a single folder.</li>
<li>Developers drop the framework folder into a new parent theme and load the framework.</li>
<li>Users create a child theme based on the parent theme to house their customizations, allowing both the framework and parent theme to be updated.</li>
</ul>
<p>Here&#8217;s a diagram for reference:</p>
<p><img src="http://justintadlock.com/blog/wp-content/uploads/2010/08/framework-parent-child.png" alt="Theme structure when using a framework, parent theme, and child theme" title="Framework theme structure" width="600" height="485" class="aligncenter size-full wp-image-2521" /></p>
<p>Users should only ever have to worry about creating a child theme.  This will allow them to make modifications without losing them when the parent theme is updated.  They shouldn&#8217;t have to worry about all the other stuff.</p>
<p>As you can see by now (I hope), the question of grandchild themes has been completely averted because theme developers shouldn&#8217;t be adding advanced functionality (that might need future updating) within child themes.</p>
<h2>Doesn&#8217;t Hybrid break these rules?</h2>
<p>The <em>Hybrid</em> parent theme doesn&#8217;t break the rules.  A couple of the child themes?  Definitely.  If I could afford a time-traveling machine (and if they existed), I&#8217;d zip back a year or two and turn a couple of those child themes into parent themes instead.  We all have to learn from our mistakes, and I can freely admit that I&#8217;ve taken the wrong route on occasion.</p>
<p>So, I&#8217;m going to give you a real-world example of everything I&#8217;ve been talking about and how it could&#8217;ve been avoided with one of my own themes.</p>
<p><em>Hybrid</em> has a child theme called <a href="http://themehybrid.com/themes/hybrid-news" title="Hybrid News WordPress theme">Hybrid News</a>.  This child theme has a few extra features that make it more advanced than its parent theme.  One good example of a problem was when WordPress 3.0 launched with a new <a href="http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus" title="Goodbye, headaches. Hello, menus!">menu system</a> (which I love).  The <em>Hybrid News</em> child theme has an extra navigation menu that&#8217;s not present within its parent theme.</p>
<p>The problem:  How do you upgrade the <em>Hybrid News</em> child theme to use the the new nav menu system for its extra menu?</p>
<p>You certainly can&#8217;t expect users to upgrade the child theme and lose all of their customizations.  To solve this particular problem, I wrote a tutorial on making the switch to the new system.  But, it was just a way to avoid the larger problem at hand.</p>
<p>The solution should&#8217;ve been:  Make <em>Hybrid News</em> a parent theme.  This would allow it to be upgraded and users to keep their customizations intact.</p>
<p>If you&#8217;re a theme developer with a lot of advanced child themes, you may be thinking that you&#8217;ve got this problem all figured out.  You may have already come up with plenty of nifty solutions for avoiding these types of problems.  But, no one can foresee what new things will come in later versions of WordPress to conflict with those solutions.</p>
<h2>Introducing Hybrid Core: A theme framework</h2>
<p>Last year, I mentioned that I&#8217;d <a href="http://themehybrid.com/archives/2009/11/whats-in-store-for-hybrid-0-7" title="What's in store for Hybrid 0.7">release Hybrid Core</a> to the public for download.  Unfortunately, that release never came out.  I wanted some more time to perfect it, which turned out to be around a year worth of extra time.</p>
<p><em>Hybrid Core</em> will be a theme development framework for use by other theme developers.  What this means is that any theme developer will be able to download this and build parent themes with an awesome framework behind them.  Yes, I&#8217;m essentially giving you the keys to the <a href="http://themehybrid.com" title="Theme Hybrid">Theme Hybrid</a> kingdom.</p>
<p><em>Hybrid Core</em> is currently packaged within my <em>Hybrid</em> parent theme.  It is used to handle the &#8220;logic&#8221; behind how the theme runs.  Theme developers will be able to load this framework and build themes using the set of conventions provided by the framework.  All of the <acronym title="Hypertext Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym>, and extra functionality will be left up to you. </p>
<p>In the next month or two, I&#8217;ll be putting the finishing touches on this.  I&#8217;m still moving some stuff around that&#8217;s specific to the <em>Hybrid</em> parent theme and getting it out of the way.</p>
<p>It&#8217;d be awesome to see many great themes built off this framework.  It&#8217;s a project that I started building in June 2008, so a lot of work and testing have been put into it.  The next theme I build will be a parent theme based off it, so you&#8217;ll have a good, working example of how to use the framework.</p>
<p class="alert">Just in case you were wondering if building a &#8220;grandchild&#8221; theme is actually possible, the answer is no, at least not by default.  And, I hope to never see the day it happens.</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2010/08/16/frameworks-parent-child-and-grandchild-themes/feed</wfw:commentRss>
		<slash:comments>87</slash:comments>
		</item>
		<item>
		<title>Lowercase p, dangit!</title>
		<link>http://justintadlock.com/archives/2010/07/08/lowercase-p-dangit</link>
		<comments>http://justintadlock.com/archives/2010/07/08/lowercase-p-dangit#comments</comments>
		<pubDate>Thu, 08 Jul 2010 07:39:20 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=2443</guid>
		<description><![CDATA[Why the <code>capital_P_dangit()</code> function is not only a bug but a detrimental blow to the WordPress community.]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t been following the latest hot debate in the WordPress community, you&#8217;re in for some news.  If you have been following it, you&#8217;re probably in a fiery rage, given up all hope in the &#8220;community&#8221; aspect of this community project, or are just sitting back laughing at the rest of us.</p>
<p><em>The issue</em>:  Before WordPress 3.0 was released, a small piece of code was added to the WordPress core that changes all instances of &#8220;Wordpress&#8221; (notice the lowercase &#8220;p&#8221;) to &#8220;WordPress&#8221; in areas where content is shown on the site.  We&#8217;ll get to the details in a bit.</p>
<p>I tried hard to stay out this debate because I&#8217;m fairly certain I made a vow to myself to stay out of these types of arguments.  But, I&#8217;ve got a few opinions on this one that I can&#8217;t just keep to myself.  And, as someone that is considered a <em>leader</em> within the WordPress community, I feel responsible for communicating with that community on this issue.</p>
<h2>It&#8217;s spelled &#8220;WordPress&#8221;</h2>
<p><a href="http://wpcamelcase.com/" title="WP CamelCase">WPCamelCase.com</a> says so, and I&#8217;d never question an entire site dedicated to the proper spelling of a single word.</p>
<p>On a more serious note, these are not proper:</p>
<ul>
<li>Wordpress</li>
<li>wordPress</li>
<li>wordpress</li>
<li>Word Press</li>
<li>word press</li>
<li>wordress</li>
<li>WoRdPrEsS</li>
</ul>
<p>Coming from an English and journalism (especially journalism) background, I feel a strong need to hack into the site of anyone that misspells WordPress and correct it for them.  Fortunately, I don&#8217;t know how to hack people&#8217;s sites, have just a smidgen of self control, and respect the rights of others.</p>
<h2>Why is there an issue?</h2>
<p>Matt Mullenweg wrote a filter function called <code>capital_P_dangit()</code> that correctly capitalizes the &#8220;P&#8221; in misspellings of WordPress where the &#8220;p&#8221; is lowercase.  It may seem like a minor thing, but there are several issues at hand.</p>
<ul>
<li>The code literally breaks things like URLs on some sites.  For example, suppose you installed WordPress in a <code>/Wordpress</code> directory.  That would cause all kinds of trouble with things like images.</li>
<li>This function is effectively changing what people write, and WordPress should not have editorial control over the content of anyone&#8217;s blog.</li>
<li>The code was <a href="http://core.trac.wordpress.org/changeset/14996" title="WordPress changeset: 14996">committed to WordPress</a> without a Trac ticket, so it wasn&#8217;t left open to community discussion beforehand.</li>
<li>Matt&#8217;s responses seem to dismiss the very community of people that help make WordPress what it is.</li>
</ul>
<h2>Following the discussion</h2>
<p>I cannot accurately represent all of the discussion that has happened to this point.  I highly recommend that you read the discussions provided by the below links if you want all the details.</p>
<ul>
<li><a href="http://core.trac.wordpress.org/ticket/13971" title="'Wordpress' being turned into CamelCase 'WordPress' breaks URLs">&#8220;Wordpress&#8221; being turned into CamelCase &#8220;WordPress&#8221; breaks URLs</a></li>
<li><a href="http://lists.automattic.com/pipermail/wp-hackers/2010-July/thread.html#32841" title="WP Hackers: July 2010: Putting the P in WordPress">Putting the P in WordPress: WP Hackers</a></li>
<li><a href="http://www.wptavern.com/automatically-correcting-the-wordpress-mistake" title="Automatically Correcting the WordPress Mistake">Automatically Correcting the WordPress Mistake</a></li>
<li><a href="http://www.wptavern.com/forum/general-wordpress/1745-wordpress-wordpress-core.html" title="Wordpress to WordPress in core?">Wordpress -> WordPress in core?</a></li>
<li><a href="http://hakre.wordpress.com/2010/07/07/wordpress-egomania/" title="MattPress Egomania">MattPress Egomania</a></li>
<li><a href="http://tomlany.net/2010/05/wordpress-to-wordpress/" title="Wordpress to WordPress">&#8220;Wordpress&#8221; to &#8220;WordPress&#8221; filter</a></li>
<li><a href="http://www.misthaven.org.uk/blog/2010/07/07/a-fuss-about-nothing/" title="A Fuss About Nothing">A Fuss About Nothing</a></li>
<li><a href="http://capitalp.org" title="The capital 'P' in WordPress caused the BP oil spill">CapitalP.org</a></li>
</ul>
<h2>Breaking URLs</h2>
<p>If nothing else, this issue must be addressed.  In fact, this bug was brought up in a <a href="http://core.trac.wordpress.org/ticket/13583" title="WordPress make WP contribute to drill baby drill">bug report</a> <em>before</em> WordPress 3.0 was released.  Yes, before.</p>
<p>The resolution set for this bug: <em>wontfix</em>.</p>
<p>A <a href="http://core.trac.wordpress.org/ticket/13971" title="'Wordpress' being turned into CamelCase 'WordPress' breaks URLs">new ticket</a> is now open for discussion and resolutions.  Mark Jaquith has at least created a patch that should fix this issue.</p>
<h2>Don&#8217;t change my content</h2>
<p>The <em>real</em> issue is not the bug; it&#8217;s the display of content that people didn&#8217;t write.  Sure, the cases where people actually intend to misspell WordPress are rare, but that&#8217;s besides the point.</p>
<p>The point is that the content is yours, and you should be able to write anything any way you see fit, including &#8220;WordPress.&#8221;</p>
<p>If you want to debate that last statement in any way, I suppose you can try all you want, but I can&#8217;t think of a single reason why a piece of software should be able to control the output of my words without consent.</p>
<p>We&#8217;re talking about principles here, and changing what people write in this manner goes against everything I believe in.  I simply refuse to allow this on my site.</p>
<p>One of the reasons I use WordPress is because of its philosophy on community, openness, and freedom, which fits along nicely with my own personal philosophy about most things in life.  The idea that a piece of software could infringe upon those values is what bothers people.</p>
<h2>What about emoticons and auto-paragraphs?</h2>
<p><em>What about apples and oranges?</em></p>
<p>This line of <em>reasoning</em> keeps getting brought up in the debate.</p>
<p>If you think the forced spelling of a word and the opt-in process of converting smileys and basic word-processing are one in the same, there&#8217;s no convincing you there&#8217;s an issue.  You may as well stop reading now.</p>
<h2>Why don&#8217;t you build a plugin?</h2>
<p>According to Matt Mullenweg, <a href="http://lists.automattic.com/pipermail/wp-hackers/2010-July/032900.html" title="WP Hackers July 2010: 032900">a plugin should be built</a>:</p>
<blockquote><p>
As I said before, you are in /complete control/ of your site. It&#8217;s a single line to remove a filter. If you don&#8217;t like the filter, vote with your feet or with a plugin.
</p></blockquote>
<p><em>Vote with your feet?</em>  This type of remark represents one of the biggest issues in the WordPress community.  Attitudes like this can bring down entire empires.</p>
<p>I completely agree with the plugin idea though.  Building plugins to gauge community interest in certain features and making the decision to include these plugins in core code based on statistics is a great idea.</p>
<p>As <a href="http://www.wptavern.com/automatically-correcting-the-wordpress-mistake" title="Automatically correcting the WordPress mistake">pointed out</a> by Jeff Chander, it just so happens that someone made a plugin nearly three years ago that does the same job as <code>capital_P_dangit()</code>.  It&#8217;s called <a href="http://wordpress.org/extend/plugins/ozhs-correctly-spell-wordpress/" title="Ozh' Correctly Spell WordPress plugin">Ozh&#8217; Correctly Spell WordPress</a>.</p>
<p>At the time of writing, this plugin has received a grand total of&#8230;wait for it&#8230;338 downloads!</p>
<p>As flawed as that argument is, a new plugin has been created called <a href="http://wordpress.org/extend/plugins/remove-wordpress-to-wordpress-filter" title="Remove Wordpress to WordPress Filter plugin">Remove Wordpress to WordPress Filter</a>  that disables the <code>capital_P_dangit()</code> functionality.  Funnily enough, its number of downloads will likely surpass the other plugin within a week or two given its current rate of adoption.</p>
<p>But, since we&#8217;re voting with plugins, there&#8217;ll be <a href="http://wordpress.org/extend/plugins/profile/greenshady" title="Justin Tadlock's plugins">16 other plugins</a> that will disable this filter soon enough.  All of my plugins will have this bug fix added to them in their next updates.</p>
<p>There&#8217;s two things that will make me reconsider this decision and remove this from my plugins:</p>
<ul>
<li>The <code>capital_P_dangit()</code> function is removed from the default filters or made to be opt-in.</li>
<li>An outcry of arguments from my plugin users to remove it.  Some of us <em>listen</em> to our users, even when we disagree with them.</li>
</ul>
<p class="alert">Since some folks have missed the point of this last argument, which I thought was clever (though I&#8217;m a bit biased), I must inject a note here to interrupt the flow of this article.  <strong>No</strong>, I don&#8217;t actually intend to update all 16 of my plugins to try and prove a point.  The entire point is to show how irrational such an action would be.</p>
<h2>How to remove the capital_P_dangit() filter</h2>
<p>You can either install the <a href="http://wordpress.org/extend/plugins/remove-wordpress-to-wordpress-filter" title="Remove Wordpress to WordPress Filter plugin">Remove Wordpress to WordPress Filter</a> plugin or add the below code to your theme&#8217;s <code>functions.php</code> file.</p>
<pre><code>remove_filter( 'the_title', 'capital_P_dangit', 11 );
remove_filter( 'the_content', 'capital_P_dangit', 11 );
remove_filter( 'comment_text', 'capital_P_dangit', 31 );</code></pre>
<h2>Listen to your community</h2>
<p>I&#8217;ve only seen a handful of people that agree this function should be in WordPress.  It has been met with harsh opposition.  The people arguing to remove this function are people we need in the community.  They&#8217;re plugin developers, theme developers, contributors to core code, and evangelists for the WordPress platform.  These are the people that continue making WordPress better.</p>
<p>Don&#8217;t alienate them.</p>
<p>Are these people only a vocal minority of WordPress users?  Certainly.  However, these people speak for a larger amount of users.  For users without the knowledge of mailing lists.  For users without the understanding of how Trac works.  They are the people that interact with the majority every day.  They are the voice of the majority.</p>
<p>Don&#8217;t let their voices go unheard.</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2010/07/08/lowercase-p-dangit/feed</wfw:commentRss>
		<slash:comments>119</slash:comments>
		</item>
		<item>
		<title>It&#8217;s the little things that matter</title>
		<link>http://justintadlock.com/archives/2010/02/07/its-the-little-things-that-matter</link>
		<comments>http://justintadlock.com/archives/2010/02/07/its-the-little-things-that-matter#comments</comments>
		<pubDate>Sun, 07 Feb 2010 08:25:59 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=2291</guid>
		<description><![CDATA[Attention to detail is one of the most valuable things a developer can do to stand out from the crowd.]]></description>
			<content:encoded><![CDATA[<p>I consider myself a decent <acronym title="Hypertext Preprocessor">PHP</acronym> developer, and I know enough about design to ruin a beautiful image in Photoshop.  I&#8217;ve made quite a few plugins and themes over the past few years for WordPress as well.</p>
<p>When I&#8217;m asked how I got to the point I&#8217;m at in the WordPress community by upcoming developers, the best response I can give them is:  <em>It&#8217;s the little things that matter</em>.  If you&#8217;re not taking care of them, then the big, grand things you&#8217;re doing will only get you so far.</p>
<h2>What are the little things?</h2>
<p>The <em>little things</em> are usually things that WordPress does that slightly irritate me.  They don&#8217;t irritate me enough to switch platforms, but they are things that I wish were different.</p>
<p>I&#8217;ll show you an example of just what I mean with two pictures of the same comment using different themes.  See if you can find the major difference (i.e., the little thing) between the two.</p>
<p>The first is from the default WordPress theme:</p>
<p><img class="aligncenter" src="http://justintadlock.com/blog/wp-content/uploads/2010/02/default-pingback.png" alt="Default theme pingback" title="Pingback comment type from the Default WordPress theme" /></p>
<p>The second is from the development version of my <a href="http://themehybrid.com/themes/hybrid" title="Hybrid WordPress theme">Hybrid theme</a>:</p>
<p><img class="aligncenter" src="http://justintadlock.com/blog/wp-content/uploads/2010/02/hybrid-pingback.png" alt="Hybrid theme pingback" title="Pingback comment type from the Hybrid WordPress theme" /></p>
<p>Notice the difference?</p>
<p>The default theme displays the title text of the edit link for a pingback as &#8220;Edit comment,&#8221; which is standard for WordPress.  The <em>Hybrid</em> theme displays &#8220;Edit pingback&#8221; instead.</p>
<h2>Why make these little changes?</h2>
<p>At this point, you may simply think I&#8217;m crazy for changing &#8220;comment&#8221; to &#8220;pingback,&#8221; but the example is hardly the point.</p>
<p>What&#8217;s more important is that I would&#8217;ve likely had a user come along one day and ask, &#8220;How can I change &#8216;Edit comment&#8217; to &#8216;Edit pingback&#8217; for the pingback comment type?&#8221;  Rather than having to explain how to do this or even coming across the question at all, it&#8217;s already done.</p>
<p>An equally valid reason for doing so is that this is simply how I want things done on my personal blog.  And, when I code something that benefits me, it&#8217;s easy to give that back to the community.</p>
<h2>Those little things do matter</h2>
<p>While you may not take things as insanely far as I have in my example, it&#8217;s important to recognize how these seemingly insignificant things can help you and your users.  For example, this can translate into fewer support questions or become marketing points for your plugins/themes.</p>
<p>Attention to detail is the extra thing you should bring to the table, and end users always appreciate it when the details are covered.</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2010/02/07/its-the-little-things-that-matter/feed</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>Plugin and theme authors should force users to upgrade</title>
		<link>http://justintadlock.com/archives/2009/09/22/plugin-and-theme-authors-should-force-users-to-upgrade</link>
		<comments>http://justintadlock.com/archives/2009/09/22/plugin-and-theme-authors-should-force-users-to-upgrade#comments</comments>
		<pubDate>Wed, 23 Sep 2009 01:01:36 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=1829</guid>
		<description><![CDATA[By cutting off backwards compatibility, WordPress theme and plugin developers can help keep users' sites more secure.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">A</span> common thing we do in the WordPress community within our themes and plugins is provide backwards compatibility with older versions of WordPress.  This usually seems like a smart idea.  We want the largest possible audience, right?</p>
<p>The problem with providing backwards compatibility is twofold:</p>
<ol>
<li>Users continue using old versions of WordPress.</li>
<li>We have extra code to worry about.</li>
</ol>
<h2>Force users to upgrade</h2>
<p>With the <a href="http://lorelle.wordpress.com/2009/09/04/old-wordpress-versions-under-attack/" title="Old WordPress versions under attack">recent security scare</a> that targeted older versions of WordPress, <a href="http://weblogtoolscollection.com/archives/2009/09/12/are-you-responsible-enough-to-run-wordpress/" title="Are you responsible enough to run WordPress?">blame is being thrown around</a> left and right, from everyone to users to the WordPress developers.  While staying updated with the latest version of WordPress isn&#8217;t going to make your site 100% secure, it will make it secure from known security exploits.</p>
<p>By providing backwards compatibility in our plugins/themes, developers are partly responsible.  We&#8217;re giving users an excuse to not upgrade.  Obviously, developers are not to blame for people not upgrading their sites, but we can do our part in helping them stay secure by not supporting older versions of WordPress.</p>
<p><em>How do we not support older versions?</em>  Some things are simply going to be backwards compatible because they require no new WordPress functions, so we can&#8217;t do anything about those plugins.  The best thing to do is to use new WordPress functions as they become available and are useful to your plugin or theme.</p>
<p>Why would you want to support older versions of WordPress?  There&#8217;s no point in doing so.</p>
<h2>Get rid of code you don&#8217;t need</h2>
<p>Maybe you really don&#8217;t care if users&#8217; sites are hacked from staying on an older version.  That&#8217;s fine.  Another valid reason for keeping with the latest WordPress trends is that you don&#8217;t have to check for functions.</p>
<p>How often do you use the <code>function_exists()</code> and/or the <code>class_exists()</code> functions?</p>
<p>If you&#8217;re checking if a WordPress function exists, you&#8217;re doing so because you&#8217;re supporting older versions.  Do yourself and your users a favor and just call the function.  If it breaks a user&#8217;s site, tell them they need to upgrade.  Maybe even take a moment to explain the benefits of upgrading to them.</p>
<h2>Provide the best possible themes and plugins</h2>
<p>The WordPress developers have done about all they can do to make sure people upgrade, but we should take a bit more initiative as developers within community, the people that end users actually interact with.  By forcing users to upgrade, we&#8217;re helping them stay secure.</p>
<p>Before writing this post, I tried to think of valid reasons to provide backwards compatibility and only thought of one, and that&#8217;s the crossover period between major version upgrades.  This period should last about one month.  This gives users ample time to upgrade and provides support for people with WordPress MU.</p>
<p>I&#8217;m certainly open to other ideas about how plugin and theme developers can get more involved in the security of their users&#8217; sites.  Feel free to leave your thoughts on how they can.</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2009/09/22/plugin-and-theme-authors-should-force-users-to-upgrade/feed</wfw:commentRss>
		<slash:comments>55</slash:comments>
		</item>
		<item>
		<title>The WordPress theme directory needs an upgrade</title>
		<link>http://justintadlock.com/archives/2009/04/10/the-wordpress-theme-directory-needs-an-upgrade</link>
		<comments>http://justintadlock.com/archives/2009/04/10/the-wordpress-theme-directory-needs-an-upgrade#comments</comments>
		<pubDate>Fri, 10 Apr 2009 16:44:55 +0000</pubDate>
		<dc:creator>Justin Tadlock</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Discussion]]></category>

		<guid isPermaLink="false">http://justintadlock.com/?p=1604</guid>
		<description><![CDATA[Should WordPress theme developers be given the same access as plugin developers on the official repository?  It's time for a bit of an upgrade and a little trust.]]></description>
			<content:encoded><![CDATA[<p><span class="drop-cap">T</span>he WordPress <a href="http://wordpress.org/extend/themes" title="WordPress themes directory">theme directory</a> was opened last July.  It currently houses 700 themes and has surpassed 4 million downloads.  For anyone that&#8217;s wondering, those are good numbers to be looking at if you&#8217;re a part of the WordPress community.</p>
<p>Now that the project has seen some success, it&#8217;s time to give the directory a much-needed upgrade.</p>
<p>When the <a href="http://wordpress.org/development/2008/07/theme-directory/" title="Theme Directory: WordPress Blog">theme directory launched</a>, Joseph Scott wrote:</p>
<blockquote><p>
With the success of the plugins directory, we&#8217;ve wanted to have those same benefits in a theme directory.
</p></blockquote>
<p>But, the theme directory is missing some key components of the plugin directory.</p>
<h2>What needs to be added to the theme directory</h2>
<p>Uploading a theme right now is easy, but there&#8217;s a barrier that we don&#8217;t have with the plugin repository.  With plugins, you simply type the name of your plugin, description, and optional <acronym title="Uniform Resource Locator">URL</acronym>.  Once that&#8217;s done, you&#8217;re given access to the Subversion repository (usually within a day).  You can upload and/or update your plugin at any time  within 15 minutes.</p>
<p>With themes, you must upload a zip file and wait for someone to approve it within a day or so.  This is done on the first upload and every update.</p>
<p>What happens if you made a mistake and want to fix it?  You can&#8217;t update it in 15 minutes on the repository.  You have to repeat the upload process and wait for it to be approved again.</p>
<p>Another useful thing missing is the ability to add custom sections to the theme&#8217;s page through the <code>readme.txt</code> file, which is also a plugin repository feature.  Imagine how beneficial it would be to users if theme authors could add installation instructions and a <acronym title="Frequently Asked Questions">FAQ</acronym> to each theme&#8217;s page.</p>
<h2>Quality control and Subversion</h2>
<p>Subversion access allows us to quickly and easily update plugins.  Plus, it helps us keep track of different versions.  Judging by Scott&#8217;s post, I&#8217;m not sure Subversion access has ever been planned for themes.</p>
<blockquote><p>
We&#8217;ve gone through great lengths to make this as painless as possible for theme authors. You don&#8217;t need to know anything about Subversion.
</p></blockquote>
<p>To be perfectly honest, I&#8217;d rather not use a theme created by someone that couldn&#8217;t figure out how to use the Subversion repository.  And, this sounds like a bit of a cop-out.</p>
<p>It seems they&#8217;re really telling us that they want to control the flow of themes through the site.  They want to make sure themes carry that <acronym title="GNU General Public License">GPL</acronym> license.  Make sure they have all the suitable <acronym title="Cascading Style Sheets">CSS</acronym> classes and other such things that themes <a href="http://wordpress.org/extend/themes/about/#requirements" title="Theme directory requirements">require</a>.</p>
<p>There&#8217;s nothing wrong with a bit of quality control on the theme directory.  In fact, I expect it.</p>
<h2>Maybe the missing link is trust</h2>
<p>There are better ways to control the quality of themes being shown on the site.  For example, we could allow users to flag themes (plugins too) as breaking the rules or as not being good enough for the directory.</p>
<p>Theme authors have gotten a bit of a bad rep over the years.  We first had the <a href="http://weblogtoolscollection.com/archives/2007/04/12/on-sponsored-themes/" title="On Sponsored Themes">sponsored links predicament</a> back in 2007 and the more recent <a href="http://justintadlock.com/archives/2008/12/11/automattic-putting-the-boot-to-premium-theme-developers" title="Putting the boot to premium theme developers">purging of over 200 themes</a> from the directory.</p>
<p>Basically, themes have been used to <em>game the system</em>.</p>
<p>One would think we&#8217;d be past that point.  Allow the community to deal with the things that shouldn&#8217;t belong.  Things of the past are hurting those of us trying to play by the rules now.</p>
<h2>I really just want Subversion access</h2>
<p>I&#8217;m not sure of the real reasoning behind the differences of the plugin and theme directory.  I suspect it&#8217;s either that theme authors are seen as being too dumb to use Subversion or there&#8217;s no trust.  If the former, I am deeply offended.  If the latter, we need a better system.</p>
<p>It just feels like I&#8217;m stepping back into the Dark Ages anytime I need to update my theme on the repository.</p>
<p>What are your thoughts?  Should theme authors be given the same access as plugin developers?  Or, should the system stay the same?  Are there any specific features you&#8217;d like to see added?</p>
<p>Also, has anyone heard any news on whether child themes are/will be allowed?</p>
]]></content:encoded>
			<wfw:commentRss>http://justintadlock.com/archives/2009/04/10/the-wordpress-theme-directory-needs-an-upgrade/feed</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>

