Advertisement

10 WordPress 2.8 Features To Look Out For

by

This Cyber Monday Tuts+ courses will be reduced to just $3 (usually $15). Don't miss out.

It's a great achievement for WordPress 2.8 to be released so soon after 2.7. Named 'Baker', 2.8 adds plenty of new features, including syntax highlighting for theme/plugin editing, a theme installer, and a great revamped widgets interface and API.

1. Dashboard Columns

You can now sort your dashboard into columns, which is a great feature for those who are small or large on screen space. You can set up to 4 columns and drag and drop different widgets. I found it to be a good feature as I like re-arrange my dashboard and management pages to suit my workspace. This will surely appeal to many users.

2. Password Reminder

Just installed WordPress? This is the feature for those that forget to change their admin account password after a fresh install. It displays a big notice across the top of the admin area until you change it.

3. Theme Installer

In WordPress 2.7, you could install plugins directly through your installation. Now, the same feature has been ported to themes, allowing you to install any theme directory into your WordPress site. Installing is as easy as installing plugins -- through the click of a button.

4. Theme/Plugin Editor - Syntax Highlighter & Function Reference

This is a feature that I've been looking forward to, along with many other developers. WordPress now has syntax highlighting thanks to CodePress. This means you can find functions and browse through code much easier, as you would with your code editor.

You'll also find a Documentation lookup, as so you can quickly reference WordPress functions through the Codex. These new features will speed up development of WordPress themes even further by having the tools right in front of you for quick & easy access.

5. Widgets Interface

WordPress' widgets management interface was a bit plain and simple. That's no longer true with the brand new widgets interface allowing you to sort and manage your theme's widgets more efficiently. It still uses the drag and drop method of adding/removing widgets, but takes the active/inactive widgets one step further separating them from each other.

6. Widgets API

Creating widgets is now easier than ever before with the new widgets API. All you have to do is extend the basic class and functions, and you can easily create a widget with options and more. Here's an example widget using the new API; it's been coded to allow the user to set the title, but display predefined content.

<?php
/*
Plugin Name: Example Widget
Plugin URI: 
Description: An example widget using the WordPress 2.8 Widget API.
Version: 1.0.0
Author: Andrew Turner
Author URI: http://andrew-turner.com
*/
class exWidget extends WP_Widget {
    /* Constructs Widget */
    function exWidget() {
        parent::WP_Widget(false, $name = 'exWidget');	
    }

    /* Widget Base */
    function widget($args, $instance) {		
        extract( $args );
        ?>
              <?php echo $before_widget; ?>
                  <?php echo $before_title
                      . $instance['title']
                      . $after_title; ?>
                  <?php echo 'Hello There!' ?>
              <?php echo $after_widget; ?>
        <?php
    }

    function update($new_instance, $old_instance) {				
        return $new_instance;
    }

    /* Options Form */
    function form($instance) {				
        $title = esc_attr($instance['title']);
        ?>
            <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
        <?php 
    }
}
/* Register Widget */
add_action('widgets_init', create_function('', 'return register_widget("exWidget");'));
?>

7. Timezones and DST

WordPress now supports timezones, and the ability to automatically update when it comes around to daylight savings. This is a new feature, and was not found in previous versions.

8. Custom Taxonomies

A Taxonomy is essentially a way that things are grouped or divided. WordPress 2.8 improves upon its Taxonomies by allowing you to develop your own. By default, WordPress includes three of its own.

  • category
  • post_tag
  • link_category

Uses for custom taxonomies might include making post series or more. Here's an example of creating a custom taxonomy, the code is placed in your theme's functions.php file.

<?php
add_action( 'init', 'custom_taxonomies', 0 );
function custom_taxonomies() {
	register_taxonomy( 'version', 'post', array( 'hierarchical' => false, 'label' => 'Version', 'query_var' => true, 'rewrite' => true ) );
	register_taxonomy( 'released', 'post', array( 'hierarchical' => true, 'label' => 'Released', 'query_var' => true, 'rewrite' => true ) );
	register_taxonomy( 'downloads', 'post', array( 'hierarchical' => false, 'label' => 'Downloads', 'query_var' => true, 'rewrite' => true ) );
}
?>

To understand how to create your own taxonomy, you need to understand what's behind the code. Here's a breakdown of the following example:

	register_taxonomy( 'version', 'post', array( 'hierarchical' => false, 'label' => 'Version', 'query_var' => true, 'rewrite' => true ) );
  • version : Tells WordPress the name of your taxonomy.
  • post : Tells WordPress what type of content this applies to; you could apply your taxonomy to pages or even links if you wanted too. Though WordPress handles custom taxonomies with posts best.
  • hierarchical : Asks whether the taxonomy's terms can be shown in a hierarchy (A hierarchy is setup like a tree of items, eg: categories.). You can set this to true for the terms to be organized like categories, or false for them to behave like tags.
  • label : The name of your taxonomy that will be seen in the WordPress admin for posts, pages or links.
  • query_var : A parameter that lets WordPress know if you want to retrieve your posts through a query -- for example showing all posts which relate to the product released in 2008. If you've set your taxonomy so you can query it, remember the variable for the query will be the name of your taxonomy.
  • rewrite : Whether you'd like to allow WordPress to use your permalink structure when viewing the archives or taxonomy page. Eg, instead of yourproduct.net/?released=2008 it could become yourproduct.com/released/2008.

9. Faster Administration Pages

The WordPress team have sped up the administration pages (E.g: Posts, Comments, Settings, etc) through script compression and concatenation. Now, you can perform tasks quicker and easier. Take note of the fact that this feature doesn't apply to the front end of your WordPress website.

10. Plugin Management Updated

The plugin management interface that allows you to activate and deactivate plugins has been updated with a new layout - it still heralds the same features as in WordPress 2.7, but with a different layout. You'll find that they've been put together in a list on the single page, but there's an option to view different statuses such as:

  • Active
  • Inactive
  • Recently Active
  • Upgrade Available

WordPress 2.8 brings some great new features to the table - some major and others minor - but they're changes that make using WordPress more efficient, convenient and reliable. Keep an eye out for WordPress 2.9 and beyond as it evolves into what could be one of the best Content-Management-Systems available!


Advertisement