<?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/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Technosailor.com &#187; wordpress cheatsheets</title>
	<atom:link href="http://technosailor.com/tag/wordpress-cheatsheets/feed/" rel="self" type="application/rss+xml" />
	<link>http://technosailor.com</link>
	<description>Business and Technology with Common Sense</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:54:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19888</generator>
		<item>
		<title>10 Things You Need to Know About WordPress 3.3</title>
		<link>http://technosailor.com/2011/11/17/10-things-you-need-to-know-about-wordpress-3-3/</link>
		<comments>http://technosailor.com/2011/11/17/10-things-you-need-to-know-about-wordpress-3-3/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 20:22:17 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Aaron Brazell]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress 3.3]]></category>
		<category><![CDATA[wordpress cheatsheets]]></category>

		<guid isPermaLink="false">http://technosailor.com/?p=8498</guid>
		<description><![CDATA[WordPress 3.2 has been downloaded a killer 12M+ times. WordPress as a whole continues to grow and is touted to be in the approximate 14% of the web zone. That&#8217;s ridiculously huge and it astounds me how big the projects &#8230; <a href="http://technosailor.com/2011/11/17/10-things-you-need-to-know-about-wordpress-3-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://technosailor.com/files/Screen-Shot-2011-11-17-at-2.18.53-PM-600x397.png" alt="WordPress Downloaded over 12.5M times" title="WordPress Downloaded over 12.5M times" width="584" height="386" class="alignright size-large wp-image-8505" />WordPress 3.2 has been downloaded a killer 12M+ times. WordPress as a whole continues to grow and is touted to be in the approximate 14% of the web zone. That&#8217;s ridiculously huge and it astounds me how big the projects footprint has become in the 7 years I&#8217;ve been around the community. Well done to all involved!</p>
<p>With that said, WordPress 3.3 is just around the corner and, as usual, it&#8217;s chock full of goodies for everyone. I&#8217;d say that the notable changes for developers are the most significant. Improved metadata handling, improved SQL tools, improved cache API and deprecation of several venerable functions are all changes that developers should be aware of.</p>
<p>This article touches mostly on the user experience and features that are new in WordPress 3.3. Developers who want to dive in should reference <a href="http://codex.wordpress.org/Version_3.3">this running list of &#8220;things&#8221; that were addressed in WP 3.3</a>.</p>
<h2>Admin Bar Overhaul</h2>
<p>The Admin Bar that was introduced a few versions ago has become a main-stay of my WordPress experience. At first, I felt like it got in the way, but I soon got used to it. In WordPress 3.3, the Admin Bar gets tweaked and enhanced. For Multisite users, you now have access to the Network Admin from a new &#8220;My Sites&#8221; menu along with all sites that you have access to <a class="simple-footnote" title="You will only see sites that you have a Core Role on (Administrator, Editor, Author, Contributor, Subscriber). Super Admins that are not assigned to a blog, even though they have access to it as a Super Admin, will not have that blog listed" id="return-note-8498-1" href="#note-8498-1"><sup>1</sup></a>.</p>
<p>As usual, developers can modify the admin bar using the <code class="codecolorer text default"><span class="text">admin_bar_menu</span></code> action, and hooking a callback that modifies the <code class="codecolorer php default"><span class="php"><span style="color: #000088;">$wp_admin_bar</span></span></code> global. This object is created by the <code class="codecolorer php default"><span class="php">WP_Admin_Bar</span></code> class that provides an <code class="codecolorer php default"><span class="php">add_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></span></code> and <code class="codecolorer php default"><span class="php">remove_menu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></span></code> method for manipulation.</p>
<p>Sample Code:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> ab_add_faq_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$wp_admin_bar</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add_menu</span><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'id'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'menu_faq'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FAQs'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'href'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://example.com/faqs'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'meta'</span> <span style="color: #339933;">=&gt;</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'custom_adminbar_menu'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
add_action<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'wp_admin_bar'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ab_add_faq_link'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<h2>HTML5 Admin/Responsive Layout</h2>
<p>More Admin-side improvements, like a conversion to HTML5 are a little more understated and less pronounced &#8211; unless you&#8217;re trying to access it from your iPhone or mobile phone. The conversion to HTML5, while meeting the trends of the day, also have the practical effect of providing an adaptive design which conforms to the device or viewport you are using. There&#8217;s nothing too crazy here, but with the web world going in the direction of HTML5, this move lays groundwork for new HTML5 features in the future.</p>
<h2>Drag and Drop Media Uploader</h2>
<p>One of the biggest new features in WordPress 3.3 (and a long time in coming!) is a new and improved media uploader. This is a feature that is discussed every single release cycle but because there&#8217;s only so much room in a major release cycle for major features (and this is a huge rewrite), it has continued to get bumped to a future release &#8211; until now.</p>
<p>While the new uploader is not the holy grail and I feel like there&#8217;s still a lot of room for improvement, it takes a giant leap forward in making the web interface feel more natural and more like a native application.</p>
<p>What am I talking about? Well, three words: Drag and Drop. With the new media uploaded, it&#8217;s as simple as dragging files to the &#8220;drop zone&#8221; in the native way that your OS allows: On Mac, from the Finder or by dragging the title bar icon in the app you&#8217;re using (Photoshop? Preview? Skitch?) into drop zone. On Windows, by pulling your file from Explorer into the Drop Zone.</p>
<p>Plus, related to the last feature, this media uploader prefers HTML5. For the geeky, the failover for HTML5 uploading is first Silverlight, then Flash then the old fashioned &#8220;Choose File&#8221; HTML dialog.</p>
<div id="attachment_8501" class="wp-caption aligncenter" style="width: 594px"><img class="size-large wp-image-8501" title="HTML5 Media Uploader" src="http://technosailor.com/files/Screen-Shot-2011-11-17-at-12.04.37-PM-600x375.png" alt="HTML5 Media Uploader" width="584" height="365" /><p class="wp-caption-text">HTML5 Media Uploader</p></div>
<h2>Welcome Screen and Pointers</h2>
<p><img class="alignright size-full wp-image-8502" title="Dashboard ‹ Technosailor.com — WordPress" src="http://technosailor.com/files/Dashboard-‹-Technosailor.com-—-WordPress.jpg" alt="" width="355" height="209" />If you already are using WordPress, you won&#8217;t see the welcome screen unless you setup a new WordPress install <a class="simple-footnote" title="You can manually turn the Welcome panel on in the Dashboard Screen Option" id="return-note-8498-2" href="#note-8498-2"><sup>2</sup></a>. The Welcome panel gives an overview of WordPress to new users.</p>
<p>More importantly, there is a new jQuery plugin that adds &#8220;Pointers&#8221; to WordPress whenever a new core, user facing feature is added. In WordPress 3.3, you&#8217;ll see one immediately pertaining to the new Admin Bar. However, Plugin and Theme developers who want to highlight new features can also do so. If you know jQuery, the following code is a good head start in the right direction:</p>
<p>Sample Code:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function ab_pointers()<br />
{<br />
&nbsp; if( !is_admin() )<br />
&nbsp; &nbsp; return false;<br />
<br />
&nbsp; // Get Proper CSS involved - probably already included, but we want to be safe.<br />
&nbsp; wp_enqueue_style( 'wp-pointer' );<br />
&nbsp; wp_print_styles();<br />
<br />
&nbsp; // Get Proper bundled jQuery plugin involved - probably already included, but just to be safe<br />
&nbsp; wp_enqueue_script( 'wp-pointer' );<br />
&nbsp; wp_print_scripts();<br />
<br />
&nbsp; // Define text for the Pointer. Make sure you escape stuff<br />
&nbsp; $widget_text = '&lt;h3&gt;' . esc_js( __( 'Important!') ) . '&lt;/h3&gt;';<br />
&nbsp; $widget_text .= '&lt;p&gt;' . esc_js( __( &quot;This is where you would put some text that'll help the user understand WTF is up with your new stuff. Use it wisely and make sure it's short (Users won't read it if it's too long and once they dismiss it, it won't be shown again)&quot; ) ). '&lt;/p&gt;';<br />
&nbsp; ?&gt;<br />
&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;<br />
&nbsp; jQuery(document).ready(function(){<br />
&nbsp; &nbsp; jQuery('#your_dom_element').pointer({<br />
&nbsp; &nbsp; &nbsp; content &nbsp; &nbsp;: '<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$widget_text</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>',<br />
&nbsp; &nbsp; &nbsp; position&nbsp; &nbsp;: 'left',<br />
&nbsp; &nbsp; &nbsp; close &nbsp;: function() {}<br />
&nbsp; &nbsp; }).pointer('open');<br />
&nbsp; });<br />
&nbsp; &lt;/script&gt;<br />
&nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #009900;">&#125;</span><br />
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_head'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'ab_pointers'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>I imagine this will get easier to implement in the future.</p>
<h2>Improvements to Distraction Free Writing</h2>
<p>Distraction Free Writing, <a href="http://technosailor.com/2011/06/20/10-things-you-need-to-know-about-wordpress-3-2/">which made its debut in WordPress 3.2</a>, offered bloggers vast improvements to how they wrote content by removing the silly things that, well, distract from the job of writing.</p>
<p>In WordPress 3.3, DFW now integrates the content width and other CSS stylings of post content into the editor. This is all based on the active theme CSS and it attempts to aid the blogger in formatting properly for the theme the content will be displayed in.</p>
<h2>Admin Menu Flyouts</h2>
<p>A minor enhancement, yet important from a UI perspective &#8211; especially for those of you who, like me, constantly have wp-admin menus expanded &#8211; are menu flyouts. Very simple little thing, but when a user mouses over a menu, the submenu items under it appear in a &#8220;flyout&#8221; to the right and disappear when the mouse is no longer over the top level menu. Of course, for touch devices and clicky people, the collapse/expand functionality still exists.</p>
<p><img class="alignright size-large wp-image-8503" title="Screen Shot 2011-11-17 at 1.19.54 PM" src="http://technosailor.com/files/Screen-Shot-2011-11-17-at-1.19.54-PM-600x394.png" alt="" width="584" height="383" /></p>
<h2>Tumblr Importer</h2>
<p>Technically, importers are <a href="http://technosailor.com/2009/11/11/10-things-you-need-to-know-about-wordpress-2-9/">no longer bundled with WordPress core</a>. They are plugins. However, the removed importers are still listed on the Tools > Import console and can be installed from within WordPress.</p>
<p>An importer that has been in demand for some time, due to the popularity of <a href="http://tumblr.com">Tumblr</a> but the more popular nature of WordPress, is a Tumblr importer. Now that is available &#8211; also as a one-click plugin &#8211; to assist Tumblrs in moving to WordPress.<br />
<div id="attachment_8504" class="wp-caption alignright" style="width: 594px"><img src="http://technosailor.com/files/Screen-Shot-2011-11-17-at-1.35.13-PM-600x394.png" alt="Tumblr Importer" title="Tumblr Importer" width="584" height="383" class="size-large wp-image-8504" /><p class="wp-caption-text">Tumblr Importer</p></div></p>
<p>Go forth and enjoy a better blogging experience. And hey, use <a href="http://codex.wordpress.org/Press_This">Press This</a> if you like the Tumble style.</p>
<h2>Multisite &#8211; Internationalized Domain Name Support</h2>
<p>For non-english Multisite installs, it is now possible to designate an international domain name <a class="simple-footnote" title="IDNs are domain names that contains non-ASCII characters such as are provided by languages like Arabic, Kanji or Hiragana or language styles like Cyrillic" id="return-note-8498-3" href="#note-8498-3"><sup>3</sup></a> as the site install domain. In Multisite, this means that base installs of WordPress can use IDNs now, which will serve to increase the adoption of these domains in non-English speaking parts of the world.</p>
<p>ワードプレスのイェーイ.jp, FTW!</p>
<h2>Multisite &#8211; Network Enabled Themes and Theme Updates</h2>
<p>Since we&#8217;re on the topic of Multisite, WordPress 3.3 brings the Network Activate option that has been available for plugins to themes. The plugin flow and the theme flow is different in WordPress, so this option makes things significantly easier. The plugin workflow only allows Super Admins to <em>install</em> WordPress and gives the Super Admin the ability to turn off the plugin menu for Blog Admins, but if left turned on, any Admin can activate any available plugin for their particular blog. For plugins, Super Admins can designate a plugin as a global plugin by Network activating in the Network Admin.</p>
<p>For Themes, it was an arduous task of making themes available to sub-sites in the past. Now, after installing a theme from the Network Admin, all it takes is a single click on Network Activate to make that theme available to sites in the network.</p>
<h2>Deprecating Feeds</h2>
<p>Finally, for those of you who rely on your feeds and are stuck in the stone age still, WordPress no longer supports old RSS 0.92 feeds and RDF feeds. For what it&#8217;s worth though, the default RSS feed is the still supported RSS 2.0 feed (add <code class="codecolorer text default"><span class="text">/feed</span></code> to the end of just about any URL in WordPress and that is your RSS 2.0 feed.</p>
<p>Still, I know some of you don&#8217;t like to change and may be using the old feeds. There are two things to note:</p>
<ol>
<li>These now-deprecated feeds will redirect to the proper feed, with 301,</li>
<li>If you use <a href="http://feedburner.com">FeedBurner</a>, or similar feed repurposing and syndication service, please make sure you are using the RSS 2.0 feed, not the RSS 0.92 feed. Like I said, a 301 will occur but that is actually additional load on the web server because it generates additional HTTP requests</li>
</ol>
<h2>Wrap Up</h2>
<p>Sadly, this was the first WordPress release in some time where I have not contributed any code. There are a lot of reasons for that, none of which are all that important. But the core development team has really done a great job with this release and they should be commended. </p>
<p>If you really like WordPress, <a href="http://wordpressfoundation.org/donate/">thank the team with a donation to the WordPress Foundation</a>. All of the work that has gone into this release has come on the backs of volunteers or dedicated, full time paid employees of other companies who have been &#8220;donated&#8221; to the project.</p>
<div class="simple-footnotes"><p class="notes">Notes:</p><ol><li id="note-8498-1">You will only see sites that you have a Core Role on (Administrator, Editor, Author, Contributor, Subscriber). Super Admins that are not assigned to a blog, even though they have access to it as a Super Admin, will not have that blog listed <a href="#return-note-8498-1">&#8617;</a></li><li id="note-8498-2">You can manually turn the Welcome panel on in the Dashboard Screen Option <a href="#return-note-8498-2">&#8617;</a></li><li id="note-8498-3">IDNs are domain names that contains non-ASCII characters such as are provided by languages like Arabic, Kanji or Hiragana or language styles like Cyrillic <a href="#return-note-8498-3">&#8617;</a></li></ol></div>]]></content:encoded>
			<wfw:commentRss>http://technosailor.com/2011/11/17/10-things-you-need-to-know-about-wordpress-3-3/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
	
		<media:thumbnail url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-2.18.53-PM-757x288.png" />
		<media:content url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-2.18.53-PM-757x288.png" medium="image">
			<media:title type="html">WordPress Downloaded over 12.5M times</media:title>
		</media:content>
		<media:content url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-2.18.53-PM.png" medium="image">
			<media:title type="html">WordPress Downloaded over 12.5M times</media:title>
			<media:thumbnail url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-2.18.53-PM-150x99.png" />
		</media:content>
		<media:content url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-12.04.37-PM.png" medium="image">
			<media:title type="html">HTML5 Media Uploader</media:title>
			<media:description type="html">HTML5 Media Uploader</media:description>
			<media:thumbnail url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-12.04.37-PM-150x93.png" />
		</media:content>
		<media:content url="http://technosailor.com/files/Dashboard-‹-Technosailor.com-—-WordPress.jpg" medium="image">
			<media:title type="html">Dashboard ‹ Technosailor.com — WordPress</media:title>
			<media:thumbnail url="http://technosailor.com/files/Dashboard-‹-Technosailor.com-—-WordPress-150x88.jpg" />
		</media:content>
		<media:content url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-1.19.54-PM.png" medium="image">
			<media:title type="html">Screen Shot 2011-11-17 at 1.19.54 PM</media:title>
			<media:thumbnail url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-1.19.54-PM-150x98.png" />
		</media:content>
		<media:content url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-1.35.13-PM.png" medium="image">
			<media:title type="html">Tumblr Importer</media:title>
			<media:description type="html">Tumblr Importer</media:description>
			<media:thumbnail url="http://technosailor.com/files/Screen-Shot-2011-11-17-at-1.35.13-PM-150x98.png" />
		</media:content>
	</item>
		<item>
		<title>10 Things You Need to Know About WordPress 2.9</title>
		<link>http://technosailor.com/2009/11/11/10-things-you-need-to-know-about-wordpress-2-9/</link>
		<comments>http://technosailor.com/2009/11/11/10-things-you-need-to-know-about-wordpress-2-9/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 22:36:41 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Aaron Brazell]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress 2.9]]></category>
		<category><![CDATA[wordpress cheatsheets]]></category>

		<guid isPermaLink="false">http://technosailor.com/?p=7832</guid>
		<description><![CDATA[Gentlemen, start your engines! WordPress 2.9 is just around the corner. Unlike WordPress 2.8, which Mark Jaquith describes as the Snow Leopard of WordPress since most of the basis of the WordPress 2.8 upgrade was complete rewrites and optimization of &#8230; <a href="http://technosailor.com/2009/11/11/10-things-you-need-to-know-about-wordpress-2-9/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span class="drop_cap">G</span>entlemen, start your engines! WordPress 2.9 is just around the corner. Unlike WordPress 2.8, which <a href="http://markjaquith.wordpress.com">Mark Jaquith</a> describes as the Snow Leopard of WordPress since most of the basis of the WordPress 2.8 upgrade was complete rewrites and optimization of the infrastructure that ran WordPress instead of providing lots of new features in the same way Apple&#8217;s new OS X release is a focus on improved performance instead of features, WordPress 2.9 brings major new &#8220;bling&#8221; to the table. As a reminder of WordPress 2.8, you can see the writeup that <a href="http://wpvibe.com">Jonathan Dingman</a> brought us <a href="http://technosailor.com/2009/06/05/10-things-you-need-to-know-about-wordpress-28/">last time around</a>.</p>
<p>By and large, this release is a plugin developers release with lots of new APIs and abstraction. However, there are significant additions for theme designers and users as well. As a result, unlike previous iterations of this article (I do one for every major WordPress release), I&#8217;m going to break this down into sections for each kind of feature.</p>
<h2>Themes: the_post_thumbnail()</h2>
<p>Theme developers have a new piece of functionality that have become extremely popular in themes these days. As blogs have evolved from journal form into entities that can be very magazine-like, the use of thumbnail images has also grown. Typically, this layout is achieved through the use of custom fields that must be manually created and populated. No more!<br />
<img src="http://technosailor.com/files/wordpress-logo-hoz-rgb.png" alt="" width="499" height="113" class="alignright size-full wp-image-7675" /><br />
As of WordPress 2.9, if you use the built in image uploader, then WordPress handle this for you. Theme designers that wish to support this feature can add the template tag the_post_image() to their themes to achieve proper placement as required by the theme layout. The template tag can optionally take a &#8220;size&#8221;, which is one of the WordPress default sizes: thumbnail, medium, large, etc. If none is provided, it defaults to your preset thumbnail size.</p>
<p>Example:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;entry&quot;</span><span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>h1<span style="color: #339933;">&gt;&amp;</span>lt<span style="color: #339933;">;</span>a href<span style="color: #339933;">=&amp;</span>quot<span style="color: #339933;">;</span><span style="color: #0000ff;">&quot;&amp;gt;&lt;/a&gt;&lt;/h1&gt;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <br />
&lt;/div&gt;</span></div></td></tr></tbody></table></div>
<p>Conveniently, if a theme is enabled for post thumbnails, the only &#8220;feature&#8221; currently offering this support in WordPress, then a new &#8220;meta box&#8221; will be displayed on the Write screen allowing you to assign a post image.</p>
<h2>Themes: Register Support for WordPress Features</h2>
<p><em>Editorial Note: Since this article was published, the code has changed to refer to post-thumbnails, not post-images. As a result, function names have also change. The code and examples included before reflect this change. Sorry for the confusion and sorry specifically to theme devs who have implemented the_post_image() feature already. Just change it to the_post_thumbnail()</em></p>
<p>This may seem to be an obscure feature, and typically, it&#8217;s pretty simple to figure out what I&#8217;m talking about just by looking at the header. In this case, it&#8217;s a bit more obscure because it suggests a feature that is introduced in WordPress 2.9 and then only for a very niche purpose. I can see this being built out over time, and plugin authors can supply their own use cases.</p>
<p>The concept is simple. If a feature exists &#8220;” in the core, the only use case is for the thumbnails I described earlier and it is called &#8216;post-thumbnails&#8217;&#8220;” then a theme can declare support for the feature using the add_theme_support() function in the theme functions.php. It can only be declared in this file and it requires a feature be assigned a name. As I mentioned, with WordPress 2.9, there is only one feature that is named and that is post-image. Plugin authors can provide their own new functionality using the require_if_theme_supports() function.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">require_if_theme_supports('my-custom-feature','/path/to/custom-lfeature-library.php');</div></td></tr></tbody></table></div>
<p>Themes would then enable support for the feature by including the following in their functions.php file.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">if ( function_exists( 'add_theme_support' ) )<br />
add_theme_support( 'my-custom-feature' );</div></td></tr></tbody></table></div>
<p>We&#8217;ve used the function_exists() check on the add_theme_support() function to ensure backwards compatibility with WordPress installations prior to WordPress 2.9. Similarly (and possibly confusingly in this context), before you would have to check for the existence of a plugin by using a function_exists() or class_exists() piece of logic and loading it if the class or function did exist, but now there are on/off switches to get it done.</p>
<h2>Users: The Trash Can</h2>
<p>On Windows, they call it the Recycle Bin. On Macs, it&#8217;s the Trash. In both cases, the feature exists to help people recover from accidental deletions. We have all had those moments where we nuked something we had no intention of nuking. With WordPress, accidental deletions have been permanent. In WordPress 2.9, everything is recoverable now with a new Trash feature. When you delete a post, page, category, comment, or any bit of content, it is moved to the Trash where you can decide whether to pull it back at a later date.</p>
<div id="attachment_7843" class="wp-caption alignright" style="width: 700px"><img class="size-large wp-image-7843" src="http://technosailor.com/wp-content/uploads/2009/11/Screen-shot-2009-11-11-at-6.08.34-PM-690x227.png" alt="The Trash Can view. From here, content can be restored or deleted permanently." width="690" height="227" /><p class="wp-caption-text">The Trash Can view. From here, content can be restored or deleted permanently.</p></div>
<p>Trash collection is done every 30 days by default, but it is possible to change this by editing your wp-config.php file. Add the following to your config file to change trash collection to every 7 days. Modify as needed.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">define('EMPTY_TRASH_DAYS',7);</div></td></tr></tbody></table></div>
<h2>Users: Image Editing</h2>
<p>One of the hot new features in WordPress 2.9 is image editing. Now don&#8217;t get me wrong. This isn&#8217;t Photoshop. And it only support basic functionality at this time. However, image editing will allow bloggers to crop, scale and rotate images from right within WordPress. From the media library, you can edit images by clicking the Edit link under an image, and then clicking the Edit button on the individual image page. This brings up an interface like what is shown below.</p>
<div class="wp-caption aligncenter" style="width: 510px"><img src="http://farm3.static.flickr.com/2684/4096969054_06d3401641.jpg" alt="The WordPress 2.9 Image Editing Screen" width="500" height="259" /><p class="wp-caption-text">The WordPress 2.9 Image Editing Screen</p></div>
<h2>Users: oEmbed</h2>
<p>oEmbed, as described at <a href="http://oembed.com/">oEmbed.com</a>, is a specification that allows media providers like <a href="http://flickr.com">Flickr</a>, <a href="http://youtube.com">YouTube</a> and others to provide data for consumer applications like WordPress about media. So by including an Embed (Use the File uploader and choose &#8220;From URL&#8221; and paste the link <em>to the page</em> that contains the media, not the media file itself) in a post or page, WordPress can retrieve the relevant specs on the media file and formulate a properly formatted embed accordingly.</p>
<p>Below is an embed of one of my Flickr photos using oEmbed.<br />
<a href="http://www.flickr.com/photos/technosailor/3630505051/sizes/m/in/set-72157619803598938/"><img src="http://farm4.static.flickr.com/3550/3630505051_e02053a1ca.jpg" alt="Scenes from San Francisco" width="500" height="333" /></a></p>
<p>Below, is an oEmbedded YouTube video (Original video removed so here&#8217;s the Iron Man 2 Trailer).<br />
<object width="600" height="363"><param name="movie" value="http://www.youtube.com/v/siQgD9qOhRs?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/siQgD9qOhRs?fs=1" type="application/x-shockwave-flash" width="600" height="363" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>If you don&#8217;t want to use the GUI for this stuff, you can simply wrap the URL to the media page in embed shortcode tags like this.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[embed]http://www.youtube.com/watch?v=ZGp220EQUis&amp;amp;feature=popt00us0a[/embed]</div></td></tr></tbody></table></div>
<p>The list of supported oEmbed sites in WordPress are as follows:</p>
<ul>
<li>YouTube (via oEmbed)</li>
<li>Blip.tv (via oEmbed)</li>
<li>Flickr images and videos (via oEmbed)</li>
<li>Hulu (via oEmbed)</li>
<li>Viddler (via oEmbed)</li>
<li>Qik.com (via oEmbed) &#8220;” never heard of this site, but it was listed on oEmbed&#8217;s website, so&#8221;¦</li>
<li>Revision3 (via oEmbed)</li>
<li>Google Video (via an internal handler)</li>
<li>PollDaddy (via an internal handler)</li>
<li>DailyMotion (via an internal handler)</li>
</ul>
<p>That said, plugin authors can add new providers if they want by using the oembed_providers filter or override altogether with the WP_oEmbed-&gt;providers property.</p>
<h2>Plugins: Custom Post Types</h2>
<p>One of the strengths of <a href="http://drupal.com">Drupal</a> has been its ability to have multiple types of contents contained in objects that all look alike to PHP. WordPress has supported a variety of content types as well, but it has not been nearly as flexible making WordPress a blog platform with some additional support for pages and attachments. Technically, the only post_types that WordPress has supported have been post, page, revision and attachment. While it has technically been possible to add new post_types (like podcast, mp4, or tutorials &#8211; they could be anything, really), it has been a chore and required plugin developers to handle quite a few moving parts in order to make it all work properly.</p>
<p>No longer. Plugin authors now have API to register new post types, opening up the possibility for even more creativity and uses for WordPress.</p>
<h3>get_post_type()</h3>
<p>The get_post_type() function can only be used in the Loop. It returns the type of post a post is. Keep in mind, I&#8217;m using post loosely. All content in WordPress is kept in the posts table thereby inheriting the name &#8220;post&#8221;, but post is also a kind of content that is associated with blog content (as opposed to page which is a pseudo-static page, attachment which is information about an image or file uploaded with the media uploader, etc).</p>
<h3>get_post_types()</h3>
<p>The get_post_types() function will return a list of all types of post content. By default, this will be post, page, attachment and revision. Refer to the source code for optional arguments that can be used to control what kind of data is returned.</p>
<h3>register_post_type()</h3>
<p>As a plugin author, you can use this function to create a new post type. The first argument is the unique handle you want to assign to the post type &#8211; let&#8217;s call it podcast &#8211; and the second argument is an array that contains additional elements. The key one here is an exclude_from_search, which by default is set to true. You actually probably want to set this to false unless you really don&#8217;t want this additional content searchable. See below for example usage.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function wpb_podcast_init()<br />
{<br />
register_post_type('podcast',array('exclude_from_search' =&amp;gt; false) );<br />
}<br />
add_action('init','wpb_podcast_init');</div></td></tr></tbody></table></div>
<p>There is currently no user interface for post types. There is a patch in for UI that will likely be included in WordPress 3.0.</p>
<h2>Plugins: Comment Meta</h2>
<p>There has been a variety of meta tables in WordPress. Meta tables, like usermeta or postmeta, are database tables that contain information about the type of data that is stored in WordPress. It allows plugins and WordPress to assign metadata, such as user roles and capabilities, to pieces of data thus extending that data. Now, there is a comment meta table as well.</p>
<p>Though it is unclear how plugin authors will seek to use this table, the fact that it is available is a major deal as it essentially provides meta tables for every piece of content in WordPress now.</p>
<h2>Plugins: Metadata API</h2>
<p>With the addition of a comments meta table, it has become effectively redundant to duplicate functions throughout WordPress. You have a get_post_meta() function that does the same thing as a get_usermeta() function except they query data from different tables that also look identical except for the data stored in them.</p>
<p>In WordPress 2.9, there is an entirely new Metadata API that can be used to retrieve data from any of these meta tables.</p>
<p>The add_metadata() function takes a meta type (&#8216;comment&#8217;, &#8216;post&#8217;, &#8216;user&#8217;, etc), the ID of the content type, the key and value of the metadata and whether the information should be unique or not (true or false).</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">add_metadata('comment', 12345, 'twitter_id', 'someyoungpunk');</div></td></tr></tbody></table></div>
<p>You can also use update_metadata(), delete_metadata(), get_metadata() and update_meta_cache() for further wrangling. Refer to wp-includes/meta.php for full documentation.</p>
<h2>Themes/Plugins: Theme System Modification</h2>
<p>A lot of messiness has been eliminated in WordPress 2.9 theming. For one, new template opportunities exist. Now, instead of looking for a template file called category-x.php, tag-x.php or page-x.php, where x is the ID of one of those types of content types, it will look for these templates second. The first template that is now looked for is based on the slug. So if you have a category, tag or page called foo, the first template to be sought after would be category-foo.php, tag-foo.php, or page-foo.php. If none of these templates exist, <em>then</em> the ID-based template file is looked for.</p>
<p>Additionally, plugin developers can register new directories for themes to be located with the register_theme_directory() function.</p>
<h2>System: Database Repair Script</h2>
<p>The database occasionally needs a good spring cleaning. Other times, the database needs a repair. WordPress ships with a new script that will do just this. It is housed at /wp-admin/maint/repair.php but in order to use it, you need to create a new (or modify if it already exists for some reason) constant in wp-config.php.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">define('WP_ALLOW_REPAIR',true);</div></td></tr></tbody></table></div>
<h2>System: Minimum Requirements</h2>
<p>PHP 5 is not required yet. That&#8217;s <del datetime="2009-11-18T02:28:44+00:00">coming in WordPress 3.0</del> will be increasingly implemented over time. <del datetime="2009-11-18T02:28:44+00:00">But MySQL requirements have been boosted from MySQL 4.0 to MySQL 4.1.2.</del></p>
<h2>Bonus coverage</h2>
<p>Other interesting things in WordPress 2.9.</p>
<ul>
<li>JSON compatibility, before only beneficial to PHP 5.2, has been backported for use in WordPress</li>
<li>New &#8216;Undo&#8217;button when using the Visual Text Editor</li>
<li>A new sanitization API (with functions like esc_html())</li>
<li>The emoticon system can be altered using the smilies_src hook. :-)</li>
<li>Bulk Upgrading of plugins</li>
<li>Filesystem optimizations pertaining to FTP/SSH etc.</li>
<li>rel=&#8221;canonical&#8221; for single posts and pages aiding in SEO</li>
<li>Minify Admin CSS making for quicker (and smaller) page loads</li>
<li>Bunny Tags and Jeromes Keywords Importers removed</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://technosailor.com/2009/11/11/10-things-you-need-to-know-about-wordpress-2-9/feed/</wfw:commentRss>
		<slash:comments>108</slash:comments>
	
		<media:thumbnail url="http://technosailor.com/files/wordpress.jpg" />
		<media:content url="http://technosailor.com/files/wordpress.jpg" medium="image">
			<media:title type="html">wordpress</media:title>
		</media:content>
		<media:content url="http://technosailor.com/files/wordpress-logo-hoz-rgb.png" medium="image">
			<media:title type="html">wordpress-logo-hoz-rgb</media:title>
			<media:thumbnail url="http://technosailor.com/files/wordpress-logo-hoz-rgb-249x56.png" />
		</media:content>
		<media:content url="http://technosailor.com/files/Screen-shot-2009-11-11-at-6.08.34-PM.png" medium="image">
			<media:title type="html">Screen shot 2009-11-11 at 6.08.34 PM</media:title>
			<media:thumbnail url="http://technosailor.com/files/Screen-shot-2009-11-11-at-6.08.34-PM-250x82.png" />
		</media:content>
		<media:content url="http://farm3.static.flickr.com/2684/4096969054_06d3401641.jpg" medium="image">
			<media:title type="html">The WordPress 2.9 Image Editing Screen</media:title>
		</media:content>
		<media:content url="http://farm4.static.flickr.com/3550/3630505051_e02053a1ca.jpg" medium="image">
			<media:title type="html">Scenes from San Francisco</media:title>
		</media:content>
	</item>
	</channel>
</rss>

