10 Things You Need to Know About WordPress 2.3

We have a tradition around these parts of publishing information for the WordPress community surrounding a new major release of WordPress. With WordPress 2.3 to be released on September 24, 2007, I think it’s appropriate to follow the tradition and let you know about the ten things I think you should know about WordPress 2.3. There’s a lot under the hood that I can’t cover in this article, so particularly if you’re a developer, you should go look at the code and figure out what new hooks and functionality you can find.

Tags

Yes, tags have arrived. They have been a long time in coming and, in my humble opinion, are not perfect – but they are good. Tagging in WordPress is ad hoc and the UI presented demonstrates that. In fact there is very little UI, just a form field below the write screen area that takes a comma separated list. The methodology does reinforce the concept that tags are not hierarchal.

Observant users may notice that there is no way to edit those tags, manage a list of tags, or delete tags. I will point out that, there are already plugins that add management tools to WordPress for tagging and the development team has purposefully taken a “wait and see” approach to tags in this release. It does not make a lot of sense to add tons of UI that is later discovered to be superfluous or rarely used. Instead, they have opted to wait and see what plugins become popular with an open mind about possible integration in future releases.

Added: I was also notified about another plugin for managing tags called ClickTags. I have no first hand experience with either of these so anyone who can provide further input, I’d love to hear it.

Let me share some of the in-built changes that tags bring to the table.

  1. Terms Table – For developers, there is a new table called wp_terms. This table is a lookup table of sorts that shares terms between categories, tags and bookmarks. In previous releases, the wp_categories table was shared between categories and bookmarks and this table was the crux of the new development approach that was taken after tags were dropped for WordPress 2.2 and rebuilt from the ground up for WordPress 2.3.
  2. New Tag and Terms API – Plugin developers will appreciate new API that inevitably comes with a new feature this large. Take a look at the new
    1
    wp-includes/taxonomy.php

    for lots of new API functionality. Note that the new API probably effects more than tags, but I don’t know for sure. It probably interacts with category and links/bookmarks/blogroll API as well. If your plugins interact with this API, make sure your plugins still function as expected.

  3. New Template Tags – There are not a tremendous amount of new template tags dealing with tagging, however theme designers should be aware of them and adjust themes as necessary. Bloggers, feel free to hack your themes to use these functions, however, you may want to wait and see if your theme gets an update for WordPress 2.3 before you upgrade. There may not be a lot of documentation at first, so be sure to refer to
    1
    wp-includes/category-template.php

    to see what arguments can be passed to these tags (though all should work without any arguments whatsoever):

    • 1
      wp_tag_cloud()
    • 1
      get_tag_link()
    • 1
      get_the_tags()
    • 1
      get_the_tags_list()
  4. Tag Importers
    • Ultimate Tag Warrior
    • Jerome’s Keywords
    • Simple Tags
    • Bunny’s Technorati Tags
    • WordPress categories

I have been running WordPress 2.3 on this blog since pre-2.2 when 2.3 was supposed to be 2.2 and was branched to nuke the original tag concept and still hit the release milestone dates. I will tell you from first hand experience that importing WordPress categories does not associate those tags with entries that previously had the identical category. I think that will be a common question so I’d like to answer that here.

Feel free to gripe or complain or praise and adore the new tags functionality. If your voice is not heard then WP devs will be left to assuming what the community wants. As this is a community resource, I do invite you to express your opinions on the tagging feature here. Please keep it respectful though as the people doing this stuff by and large are volunteers devoting their time and energy to make WordPress better for everyone. If you behave respectfully, chances are your voice will be heard and not ignored.

Update Notifications


Update notifications have been a long requested feature of WordPress and thankfully in this release, it’s been delivered – not once, but twice. Now WordPress can alert you when a new version of WordPress is available as well as new plugin versions. I find the plugin update, particularly, very HAWT.

Canonical Redirection

This has long been a bane of every webmasters existence. Canonical URLs are treated differently by Google and the search engines meaning the www. version of a site is considered to be a different page than the non-www version. Search engines see two different pages and penalize one as duplicate content.

To fix this, many webmasters and bloggers, including myself, have taken steps to redirect one version to another. In my case, I redirect www versions of my URLs to non-www versions. Now, WordPress handles this internally based on the value you set as your website site URL under the Options > General page. In essence, this means instant SEO benefits to WordPress 2.3 users.

Post Workflow Improvements

Two more often requested features is better draft management functionality as well as a better editorial workflow for non-Editor, non-Administrator writers. While the second is amazingly better, the first is a step in the right direction but still not “great”.

Draft Management is improved by adding a series of dropdown menus on top of the blog’s Manage page. From this list, you can quickly select posts that are in draft status. This does not do away with links to draft posts that has traditionally been located at the top, but this too has received some TLC. If you’re a blogger that keeps lots of posts in draft for a rainy day, or simply start posts and save them to draft to work on later, you’ll be familiar with “Draft Hell” where multiple levels of links can crowd the top of the page and become unwieldly. Some smart massaging happens to this list now and displays two drafts and adds an “and more…” link to the end leading the blogger to a page listing draft posts. Aesthetically this is great, however I still think the management of drafts can be a bit unwieldly and ugly.

The second bit that pertains to workflow management has to do with “pending review” posts. These are great for multi-author blogs where “Author” level bloggers do not have the rights to publish an entry without a review. Unfortunately, in previous iterations of WordPress, an Administrator or Editor had to pay close attention to when blogs were ready for review but now, they are notified. This is an excellent editorial workflow item that is long overdue.

Pluggable Dashboard

If you’re pretty tired of getting all the stock WordPress and Technorati links on your WordPress dashboard and want to make it more useful for you, the dev team has made the WordPress dashboard customizable via several new plugin hooks.

We’ve been using this at b5media already to provide bloggers with feeds that are more relevant to them as well as replacing Technorati results with Google Blog Search results under Incoming Links. So far, no complaints!

$wpdb->prepare()

A feature that will only make hardcore developers giddy, there is a not-yet-used-yet-still-functionally-solid method added to the database class. the

1
prepare()

method is a handy little method that can be used to nuke SQL injection hacks before they become an issue by creating safe SQL code. Like I said, it’s not in use yet in WordPress because the devs ran out of time prior to release of WordPress 2.3. The feature is officially slated for WordPress 2.4 but I thought I’d point it out as the code is in place (and subject to possible modification in advance of its official support in WordPres 2.4.

Atomlib

Atomlib is a relatively late addition to the WordPress 2.3 codebase. It was created by none other than the great Sam Ruby who was influential in creating the Atom feed specification and the Atom Publishing Protocol. Atomlib provides a support library to the Atom products supported by WordPress – the Atom Publishing Protocol and the Atom 1.0 feed. As it is a self contained library, the potential for its application in other ways is there if a developer wanted to sling some code to create new functionality or plugins.

Deprecated Functions

Not a significant issue as I have not seen the two functions that have been deprecated in widespread use in the community. Yet, as a new release comes along and deprecates some functionality, I feel it necessary to point them out. In the case of WordPress 2.3, only two functions have been deprecated – and they both relate to permalinks. The first one, template tag

1
permalink_link()

has been deprecated in favor of

1
the_permalink()

. I believe most usage examples as well as most theme designers already use

1
the_permalink()

so I doubt this will have much effect. Additionally,

1
permalink_single_rss()

has been deprecated in favor of

1
the_permalink_rss()

.

As usual with deprecation, the functions still work and are available. However, it is advised that the new format be used as deprecated functions will eventually be removed from the core.

Multiple Category Widgets

With the advent of tags and terms, the possibility has been introduced to have different “groups” of categories organized in different ways. To that end, the Categories widget has been expanded to allow multiple category widgets. Though these widgets are not overly useful, someone may be able to find some uses for multiple category widgets.

Pluggable RSS Library

A common complaint in the WordPress development community has surrounded the inclusion and forced use of Magpie as an RSS parsing library. We at b5media, for instance, find a much better and supported library (Magpie stopped being developed awhile ago) in SimplePie. There may be other RSS parsing libraries available. The point is, WordPress is all about being extensible and offering the user choice.

To that end, there is a new plugin hook called

1
load_feed_engine

which allows plugin authors to load a different feed parsing engine if they so choose. I find this very interesting and useful. Others will not, but again, it’s about choice.

WordPress 2.3 brings us a lot of good things. It’s certainly not perfect. I’d personally recommend that everyone wait before rushing right out and upgrading. There may be breakage so make sure you back stuff up. With a new version, it’s usually wise to wait a few weeks and let plgin authors catch up and update their plugins. Of course, the fewer plugins you use, the better off you’ll be – but that’s a matter of choice. Overall, this is a very solid release in my opinion.

Also, I’d love it if you Dugg this article if you find it useful.

Read More

WordPress FAQ: Troubleshooting a WordPress Install

Help! My WordPress install is borked and I don’t know how to fix it or even where to begin looking

This question is actually inspired by the support thread over at the WordPress Support Forums regarding a percieved bug in the Autosave feature in WordPress 2.1. In that thread, things got very heated as one camp was distraught while the other camp was trying to figure out what was going on and couldn’t duplicate the problem.

The rules of thumb when troubleshooting – whether yourself or by asking in the support forum, mailing lists or via consultants such as myself, is to provide the most complete information possible.

For instance, whether for WordPress or any other software, try to ascertain:

  1. Plugins installed and versions
  2. Theme used
  3. Browse, OS, version numbers
  4. Firefox extensions used, perhaps
  5. Can you reproduce on a different computer?

In the case of this support issue, it seems to me there is a plugin run afoul and I provided this approach:
Disable ALL plugins – particularly ANY plugin that MIGHT have javascript in use. Does this solve this problem? (Note: it will probably create errors on the template because now plugin functions aren’t available – don’t worry when you reactivate those things will be fixed).

If that fixes the issue, take the divide and conquer approach and reactivate half your plugins (that you were using). Does the problem come back? If no, activate half of what’s left. Repeat and rinse.

If you activate plugins and the problem does return, focus on that group of plugins. Deactivate half of them and check for the problem. Does it occur? Yes? No? And so on until you find the culprit.

If none of this solves the issue, kick your theme over to Kubrick (though I doubt this is a theme related issue since the error is in wp-admin but for due diligence, follow through and check it out).

I am 99.999% sure you will find the culprit.

Be methodical. Provide detailed info on how to reproduce.

Read More

WordPress FAQ: How Do I Integrate WordPress Into a Non-Blog Site?

I have a site that is a non blog site and I want to add a WordPress blog and allow the rest of the site to benefit from feeds, users, etc from the blog itself. Is there any easy way to do this?

Absolutely, this is a simple process. I’ve had a number of people ask me how to do this over the past year and a half or so. Depending on what your ultimate goal is, there are three options. Choose your poison.

Option 1: Limited Integration

The first option is the easiest and requires no code modifications. In fact, it is as simple as uploading the blog to a separate directory (i.e. ~/wordpress) and following the normal routine of installation. The only difference is that your blog permalinks will look like this: http://www.example.com/wordpress/.

Following this method, you could then place permalinks into place on the non-blog site manually. This is beneficial if you don’t anticipate the need for a lot of dynamic blog content outside the blog.

Option 2: Permalink Integration

The next option you have requires a small code modification but will give you access to all of WordPress code and internal API for integration into the site. After uploading the blog to the non-root directory (i.e. ~/wordpress), simply copy the wordpress index.php file into the root directory of the site. Modify this code in the file to point to the correct code

require('./wp-blog-header.php');

becomes

require('./wordpress/wp-blog-header.php');

You can verify that this modification was successful by browsing to the new index.php. If there are no errors reported and the blog loads, then you’re good to go. Now just go and make appropriate modifications under the Options page of wp-admin. The blog address field should be appropriately updated.

Incidentally, if you have your own index.php page, you can add the code from the WordPress index.php file to the top of your own file. No harm, no foul.

Option 3: WordPress as a Content Management System

The final option you have could be a topic in itself: WordPress as a CMS. WordPress provides options that allow you to define custom templates for specific pages or allows you to define a specific post or page as the home page – from within WordPress!

Richard Sipe has a great write up on how to do this. If you would like to manage your entire site, both blog and non-blog, from within the easy to use interface that is the WordPress admin – this is your solution.

Read More