WordPress 2.9 Carmen With New Features Every Developer Must Know

Wordpress logo

On December 18th, 2009, WordPress Version 2.9, named in honor of magical jazz vocalist Carmen McRae, was released to the public before the year ends. You can upgrade easily from your Dashboard by going to Tools > Upgrade, or you can download from WordPress.org. The WordPress 2.9 requires MySQL 4.1.2 or greater.
You can read the full list of new features, changes, upgrades, and improvements on the WordPress Codex. Following is our list of resources for more significant features/changes from developer’s point of view:

Post thumbnails

post-thumbnailDevelopers have been using different techniques to add post thumbnail feature in their themes; but now with built-in post thumbnail feature things are going get easier and standardized. As blogs have evolved from journal form into entities that can be very magazine-like, the use of thumbnail images has also grown.
For whatever reason you first have to activate the feature with an entry in your theme’s functions.php file in order to get the Post Thumbnail box in the Editor.

[php]if (function_exists(‘add_theme_support’))
add_theme_support(‘post-thumbnails’);[/php]

Basically all you have to do is to add this new template tag in your theme files where you want to display the post thumbnail, most certainly in your index.php file:

[php]<?php the_post_thumbnail() ?>[/php]

Comment Meta

A new commentmeta table that allows arbitrary key/value pairs to be attached to comments, just like posts, so you can now expand greatly what you can do in the comment framework.

Custom post types

Custom post types have been upgraded with better API support so you can juggle more types than just post, page, and attachment. (More of this planned for 3.0.)
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 – 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.

Sidebar descriptions

This new feature allows you to add a description to each sidebar in your theme. If you like create themes with 10 or more sidebars, that really is a nice feature. It’s very simple too, all you have to do is add a description value to the array you’re using to declare sidebars:
[php]if (function_exists(‘register_sidebar’)) {
register_sidebar(array(
‘name’ => ‘Complex Sidebar’,
‘id’ => ‘complex’,
‘description’ => ‘Here is some important considerations about Complex Sidebar’,
‘before_widget’ => ‘<li id="%1$s" class="widget %2$s">’,
‘after_widget’ => ‘</li>’,
‘before_title’ => ‘<h2 class="widgettitle">’,
‘after_title’ => ‘</h2>’,
));
}[/php]

Enhancements User Features

  • The Trash Can: 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.
    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.
    [php]define(‘EMPTY_TRASH_DAYS’,7);[/php]
  • Built-in image editor allows you to crop, edit, rotate, flip, and scale your images to show them who’s boss. This is the first wave of our many planned media-handling improvements. This isn’t Photoshop. And it only support basic functionality at this time.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.
  • Batch plugin update and compatibility checking, which means you can update 10 plugins at once, versus having to do multiple clicks for each one, and we’re using the new compatibility data from the plugins directory to give you a better idea of whether your plugins are compatible with new releases of WordPress. This should take the fear and hassle out of upgrading.
  • oEmbed is a specification that allows media providers like Flickr, YouTube and others to provide data for consumer applications like WordPress about media. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.
    The list of supported oEmbed sites in WordPress are as follows:

    • YouTube (via oEmbed)
    • Blip.tv (via oEmbed)
    • Flickr images and videos (via oEmbed)
    • Hulu (via oEmbed)
    • Viddler (via oEmbed)
    • Qik.com (via oEmbed) — never heard of this site, but it was listed on oEmbed’s website, so…
    • Revision3 (via oEmbed)
    • Google Video (via an internal handler)
    • PollDaddy (via an internal handler)
    • DailyMotion (via an internal handler)
  • Automatic database optimization support, which you can enable in your wp-config.php file by adding [php]define(’WP_ALLOW_REPAIR’, true);[/php]
  • Rel=canonical support for better SEO. What is rel=”canonical”?

I hope you found this post useful and timely, and remember to share any additional WordPress 2.9 resources for developers that I may have missed.

Comments are closed.