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.
1 |
|
2 |
<?php
|
3 |
/*
|
4 |
Plugin Name: Example Widget
|
5 |
Plugin URI:
|
6 |
Description: An example widget using the WordPress 2.8 Widget API.
|
7 |
Version: 1.0.0
|
8 |
Author: Andrew Turner
|
9 |
Author URI: http://andrew-turner.com
|
10 |
*/
|
11 |
class exWidget extends WP_Widget { |
12 |
/* Constructs Widget */
|
13 |
function exWidget() { |
14 |
parent::WP_Widget(false, $name = 'exWidget'); |
15 |
}
|
16 |
|
17 |
/* Widget Base */
|
18 |
function widget($args, $instance) { |
19 |
extract( $args ); |
20 |
?>
|
21 |
<?php echo $before_widget; ?> |
22 |
<?php echo $before_title |
23 |
. $instance['title'] |
24 |
. $after_title; ?> |
25 |
<?php echo 'Hello There!' ?> |
26 |
<?php echo $after_widget; ?> |
27 |
<?php
|
28 |
}
|
29 |
|
30 |
function update($new_instance, $old_instance) { |
31 |
return $new_instance; |
32 |
}
|
33 |
|
34 |
/* Options Form */
|
35 |
function form($instance) { |
36 |
$title = esc_attr($instance['title']); |
37 |
?>
|
38 |
<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> |
39 |
<?php
|
40 |
}
|
41 |
}
|
42 |
/* Register Widget */
|
43 |
add_action('widgets_init', create_function('', 'return register_widget("exWidget");')); |
44 |
?>
|
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.
1 |
|
2 |
<?php
|
3 |
add_action( 'init', 'custom_taxonomies', 0 ); |
4 |
function custom_taxonomies() { |
5 |
register_taxonomy( 'version', 'post', array( 'hierarchical' => false, 'label' => 'Version', 'query_var' => true, 'rewrite' => true ) ); |
6 |
register_taxonomy( 'released', 'post', array( 'hierarchical' => true, 'label' => 'Released', 'query_var' => true, 'rewrite' => true ) ); |
7 |
register_taxonomy( 'downloads', 'post', array( 'hierarchical' => false, 'label' => 'Downloads', 'query_var' => true, 'rewrite' => true ) ); |
8 |
}
|
9 |
?>
|
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:
1 |
|
2 |
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!
- Follow us on Twitter, or subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.