Tag Archives: wordpress cheatsheet


10 Things You Need to Know About WordPress 3.5

For 7 years, I’ve been publishing these articles every time a new version of WordPress comes out. Since version 2.0. It’s been a long run. It began as a need to fill people in about new features in WordPress (and there were a lot in 2.0). There wasn’t anybody doing these at the time, and certainly WordPress wasn’t nearly as popular as it is now (22% of the internet is powered by WordPress).

But many more people have stepped up in recent releases and have started updating readers with new features and expectations. My job here is done. I’m passing the baton but really the baton has already been passed and I’m happy about that. This will be my final 10 things article. Thank you for sticking around and following along all these years.

On Wednesday (likely), December 5th, WordPress 3.5 will drop with all it’s gooey goodness. A BIG shoutout needs to go out to Andrew Nacin, the lead developer on 3.5, for project managing this release while also planning his wedding, and to his best man, core developer Daryl Koopersmith for leading the media efforts. And of course, all the other core contributors to this release (I, sadly, am not one this cycle).

So without further adieu, let’s get into the guts of 3.5.

Media Manager

One of the most anticipated revamps in WordPress history has finally arrived. Since the days of implementing the media upload integration, core developers, users and everyone in between has cried for a new way of managing media. It’s finally here and it is one of the biggest undertakings in WordPress core development history.

The new media manager in WordPress 3.5 simplifies the process of uploading various media formats (usually, but not limited to, images). Everything is right up front and easy to understand. Instead of having cryptic icons over top of the edit area on a post editing screen, you now have an obvious “Add Media” button.

Clicking Add Media brings up a dialog that has a very large, and obvious “drop zone” where you can drag and drop files into. This aspect has actually been around for a few versions, but now it’s a much smoother experience. Of course, you can also click the prominent “Select Files” button in the drop zone to pull up a more traditional dialog for selecting those media files and uploading.

You can also get a much more intuitive view of your already uploaded media attachment, select any number of photos and insert them into a post or create a gallery. This was all supported before, but the logical workflow makes the process a million times easier.

Also, gone are the days of uploading an image, having to close the media dialog to then re-open it to create a gallery or futz around with details for each image. This was always kludgey before. You could assign an image as a featured image without having to close the dialog, but then inevitably you’d end up in a situation where the dialog had to be closed to get into another image mode.

I’m really curious what the reaction to this feature will be.

Twenty Twelve

WordPress Twenty Twelve default theme

The front page layout of the new WordPress 3.5 default theme “Twenty Twelve”

Twenty Twelve is the new theme that is coming with 3.5 A few cycles ago, the core team decided to retire the old default “Kubrick” theme and release a new standard theme once a year. Twenty Ten came in 2010. Twenty Eleven came in 2011 and, well, obviously, Twenty Twelve is dropping in at the tail end of 2012.

Twenty Twelve is a fun theme. It’s fully responsive, so it conforms to different viewport sizes – monitors, iPads, smart phones, etc. In WordPress 3.4, the Admin got responsive love, and now the default theme gets it as well.

You can actually download and install it now, as it is also compatible with WordPress 3.4 and is on the theme repository.

This default theme has better typography, a home page template, various options for columns and widgeted areas and would serve well as a handy theme framework for child themes as well.

In addition, if you haven’t started leveraging post formats (available since WordPress 3.1), you can do that now with Twenty Twelve. The theme has built in styling defaults the match the sort of thing you’d expect from Post Formats (to me, still one of the most neglected things in WordPress)

HiDPI “Retina” Admin

For those of you on the retina display bandwagon, both Twenty Twelve and the entire administrative interface are all retina ready. No pixelation on those high-end Macs!

In WordPress 3.4, the first steps were made by providing quite a few retina (or hi-def, if you will – it will make more sense in a minute why I offer that clarification) icons in the admin. Now, the CSS (specifically for print) also supports this hi-def rendering. If you must print a tree, the print stylesheets will be printing in hi definition.

This also opens up opportunity as browsers and CSS3 continue to advance and provide developers with new tools.

Retina not only gives print versions additional clarity, and those high end Macs more beauty, but it also renders things better for you iPhone 5, iPad 3, Kindle HD and various new Android device users. Rejoice! (but I have an iPhone 4S, so meh!)

Removing the Links Manager

Links Manager Removed

So long, Links Manager, and thanks for all the fish!

Oh my God. We finally got rid of this antiquated thing!

Remember back in the day when people actually kept blogrolls? And WordPress had this feature in the menu called “Blogroll”. And then people started realizing, as possibly one of the earliest turns toward WordPress not being only a blogging tool but also a full-blown Content Management System, that Blogroll just didn’t seem appropriate (or whatever the thinking was), so it was renamed to Links.

It’s now coming out entirely. Existing WordPress install retain the Links manager but new WordPress 3.5 installs no longer have this functionality.

If you still need it, you can install the Links Manager as a plugin.

Favorite Plugins

As a developer, I am constantly setting up WordPress installs, setting up new WordPress installs, resetting WordPress installs, etc. so perhaps my favorite new feature in WordPress 3.5 is the “Favorite Plugins” doohickey. I always have a subset of plugins I use for development and functionality I consider a “must have” for a client project, etc.

Favorite Plugins can be installed from right in your plugin manager.

Favorite Plugins can be installed from right in your plugin manager.

If you go to the WordPress plugin repo (and are logged in with your WordPress.org username), you will see a new “Favorite” button on every plugin page.

This becomes incredibly useful in WordPress 3.5 where you can now pull down your favorite plugins with one-click install. When you visit the Plugins > Add New admin page, you will see a new “Quick Link” along side the “Upload”, “Popular” and other links that have been there all along. Now you just have a new menu.

This brings up a page where you can enter your WordPress.org username and get a list of all the plugins you’ve favorited on the plugin repo and install as you need.

Protip: Now you can stop emailing me and asking me what plugins I recommend. Enter MY username – technosailor – and find out which plugins I prefer.

Tumblr Importer Support

One of the most popular blog types and platforms in the past few years is Tumblr. Up until now, there hasn’t been a way to get Tumblr content imported into WordPress. That’s no longer the case.

On the Settings > Import page, you can now activate Tumblr import support. Warning: The process of importing Tumblr is a little kludgey and that is due to Tumblr’s own systems. You will need to register an app with Tumblr, enter certain key information about your WordPress install into the Tumblr app registration page, and copy certain key information into WordPress.

The instructions are all on the Import admin screen. I suggest opening up the Tumblr app registration page in a separate tab as you’ll have to go back and forth between Tumblr and WordPress.

Once you do this, you can connect WordPress to your Tumblr blog and slurp in all the data you’ve had over there. I know y’all love Tumblr, but this is your opportunity to get off of it and onto a more widely used and customizable platform. Plus, you have Press This in WordPress to allow you to continue your Tumblings.

Simplified Dashboard

Simplified Dashboard

Simplified Dashboard

The Dashboard has always been a bit of a sore spot for new users unfamiliar with WordPress. What is all this information? Unfortunately, that’s not going away quite yet. However, WordPress now makes it easier for users to get up to speed with common things like writing an about page, setting up a theme, etc.

In addition to Dashboard fixes, there have been a number of smaller UI changes in the admin, including the Privacy page being removed and merged into the Reading Settings pages. Lots of effort was put into a simpler user experience.

It’s the little things that help users get up to speed and using WordPress quickly and effectively and reduces the learning curve.

Multisite: switch_to_blog() performance problems fixed

There are a couple of Multisite improvements for developers. For the longest time, well before the merge of WPMU into WordPress, the way developers could switch “context” from one site to another would be through switch_to_blog(). Even after the merge, that function still remained the way to do it. But it has always come at the price of performance and caching. It was an extremely expensive function to use, filled with unnecessary database queries and other fudge.

It left developers looking for ways to accomplish the same task in a different way – which is really not the WordPress way. We encourage developers to use the tools WordPress provides and not to try to get around them. This mentality is almost universal and prevents problems with backwards compatibility in the case of database schema changes, etc. However, this beast had never been tamed for this specific functionality.

As of WordPress 3.5, this function has now been refactored and performs significantly better than what it did, including massive caching changes. Developers should feel far more comfortable using it. Hooray!

Multisite: Sub Directory

Another Multisite improvement is the ability to install WordPress Multisite in a folder. Up until now, WordPress Multisite could not be installed in a subdirectory. It had to be installed in the document root which was… silly.
In WordPress 3.5, a lot of work was put into making it possible to do just that. Specifically, this came out of Hack Day at WordCamp San Francisco in August. Nice work Mark Jaquith and company.

WP_Query Enhancement

One final developer tool that was added in WordPress 3.5 is a modification to the post__in argument that can be passed to WP_Query to affect what posts are pulled in a custom query/Loop. While post__in has been around awhile, and takes a comma separated list of post IDs to be retrieved, now, if the orderby parameter is set to post__in, the order of the IDs matter. Specifically, the order of the IDs in post__in is the order they are retrieved in the resulting dataset. Before they were simply ordered in numerical order (or whichever custom order parameter was supplied – post_name, post_title, etc) .

This is pretty effective for CMS-style usage of WordPress where a developer may want to have granular control of how specific content pages are listed, displayed, etc.


So that’s it! Nice big release. A lot of under the hood stuff for developers, but really this release is less of a developer’s release and more of a user experience release. When WordPress 3.5 drops on Wednesday (assuming that happens as expected), I’d love to hear feedback.

Thanks for reading all these years. I’m not disappearing. I’m just retiring from this column. Of course, I’m always looking for full-time or consulting work. Please feel free to contact me if you think we might be able to work together.

Until then…

So long and thanks for all the fish

Original Photo by Starrarte Used under Creative Commons.

Aaron Brazell

10 Things You Need To Know About WordPress 3.2

Photo credit Randy Stewart.

WordPress 3.2 will be released soon (at the time of this writing, it is in RC1 which essentially means it is done and being tested). This is an exciting release as it marks the first release that drops PHP 4 dependency. For years, WordPress has opted to play to the lowest common denominator while hosts have taken their sweet time arriving at PHP 5.

Of course, this may mean nothing to you, depending on your technical knowledge of the underlying language. However, it has limited the amount of innovation that could be possible using the more modern version of PHP 5.

The focus for this release was to slim down redundant code that had been added along the way to employ PHP 5 techniques in a PHP 4-compatible fashion. In addition, a focus was placed on slimming down code all along the way to provide a more efficient codebase. Eliminate, eliminate, eliminate! More Red than Green – a reference to the way changes are recorded visually where red is code elimination and green is code addition.

Regardless, the approach to PHP 5 adoption has had a positive effect. Approximately 12% of the web is powered today by WordPress, whether self-hosted “.org” sites or Automattic’s WordPress.com and other hosted WordPress sites.

As I have done eleven other times before, today I bring you the Ten Things that, in my opinion, you should know about WordPress 3.2.


One of the big things that was discussed internally around the time when WordPress 3.0 was released over a year ago was the need to keep the default theme fresh. To that end, for WordPress 3.0 did away with the old Kubrick theme and replaced it with the fresh and semantic Twenty-Ten theme.

Yes, you can see how naming a theme Twenty-Ten in 2010 setup the opportunity for a Twenty-Eleven theme in 2011. And there is that opportunity for a new theme called Twenty-Twelve in 2012, but let’s not get too far ahead of ourselves.

Twenty-Eleven visually is not a huge departure from Twenty-Ten. It still uses much of the same visual layout that Twenty-Ten did. The new theme, however, is greatly different behind the scenes.

Note: This blog (along with all of my blogs) are running Twenty-Eleven right now.

Users of Twenty-Eleven have the opportunity to select a one-column or two column layout for their blog from inside the WordPress Admin. The two column layouts can use a sidebar left or sidebar right variant.

My photoblog uses a one-column format, as an example.

Additionally, Twenty-Eleven also offers a dark and light color scheme. My photoblog, for instance, uses the dark format while this blog uses the light format.

Finally, as with Twenty-Ten, the theme allows for custom header images (or no header images) and backgrounds. Because of the professional nature of this blog, I’ve opted to use no header on this blog and my personal blog utilizes a custom header image.

And of course, as with all things WordPress, no one says you have to settle for what Twenty-Eleven offers out of the box. In fact, it is encouraged that you use Twenty-Eleven as a parent theme that offers all of the benefits of the default theme while putting your own spin on it with a child theme.

Distraction Free Writing

While I write this post, I am using the successor to the Full-screen mode that has been in WordPress for some time. Full screen mode, in my opinion, never really was well adopted but it has been championed in the past by bloggers who focus on efficient workstyles, or Getting Things Done (“GTD”) approach to work.

The ability to shut out all distractions so as to focus on the task at hand is hugely important. WordPress core developer Mark Jaquith has said for years that his vision for WordPress was that it would become a tool that got out of the way of people and their writing. It’s not about WordPress. It’s about writing and the experience should be such that you should never have to think about what tool you are using to do that.

With Distraction Free Writing, you have just that. By clicking on the Full Screen (in HTML writing mode) or the new icon for DFW in the toolbar of the visual text editor, the blogger finds themself on a plain off-white canvas with minor tools along the top of the screen to assist in basic formatting. If you leave your hands off the mouse, even these fade away allowing you to just write in a pleasant, serene environment.

This feature is probably my favorite in WordPress 3.2 and usability/writer-facing features are rarely my favorite as a developer. I generally prefer new APIs and developer tools. However, this feature wins hands-down.

Minor Overhaul to Administrative UI

It’s been several years since WordPress has undergone a major Admin overhaul. There have been tweaks along the way, but by and large the administrative interface has stayed true to what it evolved into (with much research and usability testing) in WordPress 2.7.

There is not a drastic overhaul in WordPress 3.2, but it is the larger than a few tweaks and color scheme modifications. In WordPress 3.1, the Admin Bar (which I’ll talk about later) came into being and in 3.2, emphasis has been put on placing more commonly accessed functions into it as opposed to the main UI.

As a result, familiar things (which were often used for blogs in Multisite mode) such as the “Favorites Menu” have been removed to the Admin Bar. The Quick Access menu that allowed Multisite Super Admins quick access to the “Network Admin” has been relocated to a less-than-obvious dropdown  in the upper right. Hint: The dropdown menu can be accessed by clicking the “Howdy Aaron” link, where “Aaron” is your username.

Other aspects of the new interface are mainly aesthetic. Menus are where you’d expect them. Features are where they’ve always been. Plugin developers who have built UI for their plugins are still safe as long as, as usual, they are using the WordPress best-practices, i.e. using the same HTML formats and structures used in core.

More Determined Move to the Admin Bar

As mentioned before, the Admin Bar has become the focus of a “Command Center” approach. By default, quick actions like Adding a new post or editing a page or getting quick access to the dashboard of other Multisite sites are loaded into quick menus in the Admin Bar.

This is also where the philosophy of plugin development that provides quick access to features should be. A good example of this is the Purge Cache functionality in W3 Total Cache. Where this has been in the Favorites menu inside WordPress, it now will have to move to the Admin Bar. This seems like a more natural place to me anyway. Other plugin developers should look at their code to ensure that they are compliant with this approach.

John Brook has a most excellent tutorial on creating and adding menus to the Admin Bar.

PHP 5.2.4 and MySQL 5.0

I mentioned the new system requirements at the beginning of this article. This shift to PHP 5 has been a long time in coming and was done deliberately to time with WordPress hosting on PHP 4 dipping below 10%. In other words, it is more than likely your host is already on PHP 5.2.4+. However, you should verify this if you’re not sure.

With the adoption of PHP 5.2.4, there is also a bump in the requirements for MySQL. Now WordPress requires MySQL 5.0, another hurdle that is not very hard to overcome but should be verified if you’re not sure.

Ryan Duff has created a quick and easy plugin that can be installed to ensure compatibility with WordPress 3.2.

For Newbies, a Better Help Menu on Each Page

For some time, WordPress has included a contextual “Help” menu in the upper right of many of the screens in the admin interface. However, with WordPress 3.2, every page has a help menu. Not only does every page have a help menu, newbies can get detailed contextual assistance for each page. Veteran users already know their way around, so this will be less than helpful, but for n00bs, the guidance lowers the barrier to entry.

Upgrade Enhancement – Just the code you need!

Think iOS5 but for WordPress. When Steve Jobs announced at WWDC recently that iOS updates would in the future come in smaller packages applying just new code and differences over the air, WordPress was already working on this (errr, except the over the air part).

Up until WordPress 3.2, upgrades were performed by downloading the entire package and applying it over the existing install. While this was fine, it took a lot more time due to the larger package size. This new version will enable future upgrades of WordPress to be done incrementally making the process much faster and efficient.

Code Efficiency enhancements

A huge emphasis was placed on core efficiency in this release. Many of the updates that have gone into this release have been major refactoring of code as well as the removal of legacy (and now unneeded) PHP4 compatibility code.

When I write these articles, I like to look at a diff file of all code changes between the last major release and the current. I was blown away by the amount of PHP4 compatibility code that has been axed.

Additionally, a lot of effort has been placed on database optimization. Many queries have been made more efficient. These things are less notable for smaller sites, but for large sites and hosting companies (such as my company, WP Engine), these types of optimizations add up in orders of magnitude!

File System API

Another optimization that has been made (getting the clue that this release is all about streamlines?) has been in the code that handles upgrades and automatic installs of plugins. When the original code was written, it was written to find what methods were available to write to the filesystem. This was because WordPress does the best it can to be as compatible as possible with as many server configurations as possible.

Some of the more obsolete (and unnecessary) transports have been done away with in favor of Streams. Though streams existed in PHP 4.3 (WordPress’ former system requirement), the upgraded requirement now allows us to do so much more with file transfer, handling and writing.

But I don’t want to get overly technical right now.

No IE6 Support

Screenshot courtesy of Mashable.

We all knew Internet Explorer was dead. Well, most of us. Believe it or not, there are still folks (mostly in government and enterprise organizations) where IE6 is still in use. While WordPress has always endeavored to be as compatible with as many configurations as possible, just like file handling replaced by Streams and PHP4 going the way of the Dodo Bird, IE6 can die in a fucking fire too. Oops. Sorry, kids. No more IE6 support.

Automatically approve parent comments

Finally, a longtime nuance has been comment approval. Comments have always been a one-to-one relationship with approval. You approve one comment at a time. And while that’s normally fine, what if you have nested comments and you approve a child comment but not a parent comment? Then you have a weird hierarchy that may not make a lot of sense.

In WordPress 3.2, now when you approve a comment that has an unapproved parent comment, the parent comment will also be approved. Many people have asked for that and now it’s here.

BONUS: Credits Screen

But wait… There’s one more thing. Every release, hundreds of people participate in the development process by writing code, contributing patches, discussing ideas in IRC and on Trac. That doesn’t even begin to acknowledge the testers, translators, and documentation writers who contribute their time free of charge.

Now, in the footer of the WordPress Admin, you’ll find a Credits link that shows everyone who has contributed to this release. Good job, guys! (I’m one of the contributors).

Aaron Brazell, Featured

10 Things You Need to Know About WordPress 3.1

Happy New Year, everyone. WordPress development on version 3.1 is wrapping up (Currently it’s in Release Candidate and should be released early in 2011)…. which means, it’s time for another edition of our 10 Things You Need to Know About posts.

This is a bigger release than was originally planned. It was supposed to stay small and set the stage for a larger WordPress 3.2 release later in the year. That release will require PHP 5.2 (make sure your host supports it now… We do at WP Engine. WP 3.1 did turn into a larger release than expected, but I think you’ll be happy. So without further adieu.

Network Admin

if you’re running WordPress in Multisite mode, or have used WordPress MU for a while, you may find yourself alarmed by the conspicuous lack of a Site Admin/Super Admin menu that has been situated at the top of the Admin menu. Never fear, though it looks like this has gone the way of the dodo, in fact it has been relocated into a separate dashboard area accessible from the new “Network Admin” in the top right of the WordPress Admin. Notably, when you click on this link, you are taken to a new dashboard for Network management (and that link then changes to Site Admin to allow quick access back into the normal WordPress admin. Also note that, like the previous Super Admin menu, this link is only viewable (and by proxy, accessible) to users who have been designated as Super Admins. This change allows for additional separation of content production and administration and allows for blogs (Sites) to be managed individually and the Network to be managed separately.

Post Formats

Perhaps one of the most talked about features in WordPress 3.1 are post formats. Post formats have been implemented in a variety of ways for years. The idea that some content is different (and should be rendered differently as a result) has gone way back. A prime example of this was the concept of “Asides” – or little blurbs that were often simply links or short posts that were off topic, not really worth a full blog post or whatever. Now, with a bit of code in a theme functions.php, you can enable any number of 9 different formats: aside, chat, gallery, link, image, quote, status, video, or audio.

In this paradigm, theme developers can target specific CSS and layout structure to each of these post formats. This enables rich user experience and high quality layout without prejudice toward the most common type of content… text. If you aren’t sure what each of these types of content are, I refer you to the Post Formats section of the Codex which has a list.

In order to enable a theme with one or more of these formats, add the following line to the theme functions.php file:

add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );

This line enables new UI in the post edit
screen that allows for you to designate a post with a specified format. For a thorough write-up on this new feature, go read the post format reference from my friend Lisa Sabin-Wilson.

Internal Linking

Have you ever gone through the torturous process of adding links to your own site to a post you’re writing? You have to go find that post from a different tab or window, usually via search or scrolling through potentially pages of content to find exactly what you want? Yeah? Me too. As a result, WordPress has added Internal Linking as a feature to WordPress 3.1.

This feature, only available when using the Visual Text Editor, allows you to add a link as you always have, or choose from already existing content on the same page. Yeah… that easy. Simply click the typical link button, then click on the arrow to
expand the “Link to Existing Content” section of the pop-up window. Pretty neat!

Import Overhaul

In advance of WordPress 3.2 and PHP5 dependence, we see yet another improvement that rewards WordPress users who utilize hosts using PHP5. The import routine has been rewritten from the ground up with efficiency in mind. While the old importer used regular expressions to parse through the WordPress export file (XML), this caused really bad efficiency problems.

Now, using native XML parsers, the WordPress import can process files much more efficiently. Additionally, similar to the file system transport API that is used by the one click installer and upgrade routines, WordPress goes through a series of checks to find the best method for XML parsing available on the server, thus a progressive enhancement for PHP 5. The first check is for SimpleXML (PHP5-only) followed by XML Parser (used in PHP 4) and, if neither of those two libraries are enabled, it falls back on the old, antiquated regex parsing.

Editorial Comment: I was hoping for a rewrite for 3.2 to both the exporter and importer that would handle everything in JSON (a much more lightweight plain text file format), perhaps optionally, instead of XML. XML parsing by nature, regardless of SimpleXML or XML Parser, is quite expensive in terms of CPU cycles and efficiency.

Theme Filter

WordPress.com users are probably familiar with the theme filter that those bloggers have had access to. With Theme Filters, users are able to quickly drill down on possible themes to install and use based on criteria such as number of columns, features, etc. To access this, simply click on the Feature Filter on the right side of the themes page to display all the options that are available. Note for Theme Developers: In order to make this useful for bloggers, please ensure that your theme style sheet headers include a Tags header similar to this:

Tags: white, yellow, light, one-column, two-columns, fixed-width, custom-colors, custom-header, custom-background

Advanced Taxonomy and Postmeta Queries

WordPress wouldn’t be complete without enhancements for developers as well. In WordPress 3.1, developers have access to powerful new features that provide for robust querying of both taxonomies and postmeta. In previous iterations, developers could target posts with WP_Query (or the Loop) to only those posts that have meta_key=foo or meta_value=bar.

The problem was, the potential for more granular targeting (i.e. get only posts with meta_key=foo AND meta_key=bar AND published BETWEEN Jan 1 of 2007 and Jan 31 of 2002) was not possible. Now it is. Replace meta_key and meta_value with meta_query and feed it in an array of arrays that contain any of key, value, compare (comparison operator) and type (data type). This will cause the query to automatically drill down with more granularity on the content requested.

$query = new WP_Query( array(
'meta_query' => array(
'key' => 'foo',
'value' => 123,
'compare' => '>=',
'type' => 'numeric'
'key' => 'foo2',
'value' => array( 'bar2', 'bar3' ),
'compare' => 'IN',
) );

The same can be done with taxonomy queries. Instead of meta_query, however, use tax_query and instead of key, value, compare and type you would use taxonomy, terms, field and operator. Otto has a good explanation for that on his site.

User Queries Overhauled and Simplified

Anyone who has done plugin development that has needed access to users have had a hodge podge of functions like get_userdatabylogin(), get_user_by_email(), etc. Not a lot of consistency, and definitely something that required frequent referencing of code. Now, from the “Duh! Why Didn’t I think of that?” file, comes the get_users() function that simplifies that API. It also wraps around a more powerful class for user search and querying called WP_User_Query.

To leverage this new API, you simply pass an array to get_users() and it returns an object based on the dataset retrieved. Arguments in the passed array can be:

  • blog_id – defaults to the blog id of the current blog (always 1 when WordPress is in standard mode but maybe another number in Multisite mode.
  • role – administrator, author, editor, subscriber, contributor. Defaults to nothing.
  • meta_key – allows for usermeta comparison and defaults to nothing.
  • meta_value – allows for usermeta comparison and defaults to nothing.
  • meta_compare – allows for usermeta comparison and defaults to nothing.
  • include – an array of user IDs to search. If empty, it searches all users. By default, it’s empty.
  • exclude – similar to include, this is an array of user IDs to not search. By default, it’s empty.
  • search – provides a way to target how columns are targeted. If, for instance, *max* is passed, wildcard searching is done in user_login, user_email, etc. By default, it’s empty.
  • orderby – specifies which column the results should be sorted on. By default, it is ‘login’ which designates the user_login column.
  • order – ASC or DESC. By default, queries are returned in ASC order.
  • offset – Designates a number of records to offset in the resulting dataset. If set to 1, for instance, the data will be returned with the first record skipped and begin on the second. By default, this is empty.
  • number – Designates how many records to return.
  • count_total – if set to true, the number of records returned is included in the dataset. By default, this is set to true.
  • fields – designates which fields to search. By default, this is set to ‘all’

Admin Bar

For those of you who have been WordPress.com or BuddyPress users, you’ll be familiar with the admin bar. The Admin bar is a toolbar that goes across the top of the site that allows users quick access to other parts of their blogs. That Admin Bar has now been brought to WordPress 3.1 as a user setting so it can be turned on or off based on preference
in your user profile.

In Multisite, the default is to show the admin bar in both the wp-admin as well as on the front end. In standard mode, the admin bar is set to only display on the front end by default. The Admin Bar, by default, provides quick access to a User menu providing a quick link to the user profile as well as the dashboard and the ability to logout. There is also a My Sites drop down menu available in Multisite that allows users quick access to blogs they have access to. There is also Admin Bar access to other frequently used areas of the blog and plenty of hooks and filters for plugin developers to add additional access.

Improvements to Custom Post Types

In WordPress 3.0, custom post types were introduced and now they have been iterated on. For one, in WordPress 3.0, custom post types could be declared but a standard set of UI was added to the admin menu. This set of UI was fashioned with an edit menu (called Posts for the standard Posts UI), Add New and, if custom taxonomies were assigned, Categories and Tags (or
whatever those taxonomies were designated as).

Now, developers can add a show_in_menu argument when registering a post type, and designate which menu to display limited UI in. This allows for custom post types to be used with the flexibility of eliminating potentially unwanted UI that would clutter the menu. Andrew Nacin has a great writeup on admin menu changes with post types that is worth the read for any developer working in this area.

Related, when declaring a post type, you have traditionally had to pass an array of labels that designate a singular version of a name (i.e. Post vs Posts) as well as a common name (i.e. Posts). You can now add menu_name to that list of labels if you want to target a specific way of displaying the post type in the admin menu.

Finally, theme developers can now create template files named archive-{post_type}.php to target specific post types to specific templates. Utilize a new has_archive() function to determine what should be displayed when there are actually posts that match the criteria of the query or not. This gives a good way of providing some kind of 404ish or other content if no content for the post type exists.

Filterable Template Hierarchy

Speaking of template files, it’s now possible to designate different template file orders and hierarchy depending on need. The original ticket, patches and ultimate core addition, uses the following example:

Take the author template hierarchy: author-{nicename}.php > author-{id}.php > author.php

Say I want to add author-{role}.php before author.php.

With an ‘author_template_candidates’ hook, I could manipulate the actual hierarchy.

Thus was born the ‘{$type}_template_hierarchy’ filter which can be used by developers to insert author-{login} before author.php in the hierarchy by hooking on the filter ‘author_template_hierarchy’. Pretty Neat!


While WordPress 3.1 is not the biggest release in the history of WordPress major releases, it does add quite a few new toys for bloggers, as well as developers. Remember when upgrading that you should, if you can, test your site in a development area before doing the upgrade. Plugins should most likely work, but you never know. And if something is broke, you can email me a aaron@technosailor.com and, for a fee, I may be able to help you out.

Finally, the second edition of the WordPress Bible will be out sometime this spring and it does, in fact, cover WordPress 3.1. However, the 1st edition is available now and is a great resource if you’re trying to get under the hood. You can buy that today on Amazon.

Credit: Andrew Nacin (@nacin), a Core WordPress Developer, slapped me with a trout several times during the course of writing this article. While I take credit for the article, any inaccuracies are entirely his fault. ;-) #blamenacin

Aaron Brazell

10 Things You Need to Know About WordPress 3.0

By now, you’ve probably heard the hype about WordPress 3.0. You may have even seen the WordPress 3.0 preview webinar I did not too long ago.

This is somewhat of an odd release as I can’t point to 10 individual new features in WordPress. However, I can point to several very large new features that have been hyped enough already. Inside each of these new major things, there are several components. So, let me break the ten things down into three groups. We’re a little behind schedule (thanks to Jane Wells’ cat below) but I think the wait is worth it.

The Merge! WordPress and WordPress Multisite Together At Last

Back at WordCamp San Francisco last year (which is happening this weekend and I will be at), Matt Mullenweg announced that WordPress and WordPress MU would be merging into one singular software package. I covered that shortly after the announcement. The reasoning was that all of the WordPress core was already in sync with WordPress MU and MU simply had a bit more functionality added to it. Most of the code is the same. Why split resources and developers?

WordPress 3.0 is where this merge takes place.

Language Changes

While this is not a new feature in WordPress, existing WordPress MU users may find themselves “thrown” by new terminology involved in WordPress 3.0. In WordPress MU, we had the concept of a “Site” which was an installation of WordPress MU. Within a Site you could have one or more blogs.

In WordPress 3.0, we have the concept of a Network (which was a Site in WordPress MU) and under a Network, we have Sites (which were Blogs). Sites are Blogs. Networks are Sites. Site Admins in WordPress MU are now called Super Admin’s in WordPress 3.0. Making things complicated, we don’t call it WordPress MU anymore. We call it putting WordPress into Multisite mode. Complicated, eh? New WordPress Core Developer, Andrew Nacin, describes this terminology nightmare.

Enabling WordPress for Multisite Mode

Something that is bound to be confusing for users who expect to simply install WordPress and get all the benefits of Multisite out of the gate are bound to be confused by the fact that there is no apparent “switch” to turn it on. When you install WordPress 3.0, it will be in standard WordPress mode. In order to flip the switch, you have to add a new constant to your wp-config.php file. It’s easy, just add the following and save:


Once this is done, you’ll find a new menu item called “Network”  in your Admin under Tools. Visit this page, enable Multisite and follow the instructions. You may need to add new configuration settings to your .htaccess file and wp-config.php, but WordPress will provide these lines for you to copy and paste.

Note: As with WordPress MU, you may need to make server level system changes to enable WordPress to handle subdomains. This is not an easily solved problem and caused heartburn with MU users and will likely continue to cause heartburn with WordPress 3.0 users as well.

Upgrading from WordPress or WordPress MU 2.9 or below

A lot of people, including myself, were concerned about upgrade paths when the Merge was announced. I should have known not to be concerned. WordPress has taken great care for years to ensure backwards compatibility and we’ve done the same thing here. If you’re on WordPress or WordPress MU, you will be able to install WordPress 3.0 and upgrade seamlessly. WordPress MU installs will become WordPress 3.0 with Multisite enabled and single installs of WordPress will retain all the benefits of standard installs of WordPress.

WordPress as a CMS: Custom Post Types and Taxonomies

Developers are already very excited about the new APIs available in WordPress 3.0. Specifically, Custom Post Types (which received initial support in WordPress 2.9). This is a very important set of new features because it finally – finally! – brings CMS support to WordPress. For the first time, we don’t have to simply pretend that WordPress is a CMS…. it can have all the CMS qualities of a Drupal or Joomla.

Custom Post Types

We initially talked about custom post types in WordPress 2.9 but in WordPress 3.0, the feature is fully vetted and able to be utilized. With a simple function in a plugin or theme, developers can create new post types (such as film reviews, podcasts or FAQs), provide entirely familiar UI (similar to posts and pages), etc.

You can find all the possible options under register_post_type() in the wp-includes/post.php file.

Custom Taxonomies

Going hand in hand with custom post types, you can also create custom taxonomies. Taxonomies are bits of metadata and most people think of them in terms of ‘categories’ and ‘tags’. Built into WordPress already are three taxonomies – categories, tags and link categories (which most people think about). The difference, from a technical perspective, between tags and categories is hierarchy. Categories have hierarchy so a category can have a child category, etc. Tags are flat and have no hierarchy.

You can create custom taxonomies with the register_taxonomy() function which will create UI automatically. All the options for custom taxonomies can be found in the wp-includes/taxonomy.php file.

Note: I have created a plugin and made it available for download that demonstrates how to use custom taxonomies and post types.

User Facing Enhancements

There are two major user facing enhancements. When I say two major user facing enhancements, I’m not being sensational. These things are killer and I think you’ll be excited.


Wow, this has been a controversial new feature. Mostly because it almost didn’t make it into WordPress 3.0 and users have really, really wanted it. Those familiar with the navigation creator in many of the WooThemes will be familiar with the new Menus feature in WordPress. This is because we worked early on with Woo to adopt their premium theme feature, which was very good, into the WordPress core (a fantastic case study on how premium theme developers can work directly with the WordPress core team).

The idea is really simple: Compose any menu with any hierarchy out of category archives, pages and custom links. Once a menu is created and saved, theme developers can enable support for this feature with the following line:


Dropdowns are automatically created and semantic CSS markup allows style modifications easily. You can also create multiple menus (let’s say, a secondary navigation piece) and use them as sidebar widgets or hardcode them directly into a theme.

Default theme… no, no default theme… no, new default theme!

Well, you know all those free themes over on the theme repository? Yeah, most of theme are heavily modified versions of Kubrick, the default theme for WordPress. Theme people would take the code base, modify it and make it their own. They might upload it to the theme repository. Problem is, they would not be updated with the new stuff that would go into Kubrick. That and Kubrick sucked as a theme.

Well, as of WordPress 3.0, there is no more Kubrick. There also is no more Classic theme. Now, we have a new theme called twentyten. Yes, that means next year, we’ll have twentyeleven.

Twentyten is a very complex theme. It should not just be duplicated and hacked up. We want themers to adopt the child theme method of doing things. This is important because as changes go into twentyten, your child theme will inherit those changes.  Here’s a good starter for how to build child themes.

Note: If you are upgrading from previous versions of WordPress and have a child theme based on Kubrick, don’t delete the default theme. If you do, you can still grab the theme from the theme repository.

WordPress Admin Enhancements

The WordPress Administrative interface has also seen enhancements. Jane Wells is our usability expert in the WordPress developers group and has done quite a lot of work. Minor enhancements include an all light-grey style color scheme (as opposed to the dark grey header bar). This does seem to be better on the eyes. Additionally, the themes interface also has a new “tabbed” interface.

Custom Backgrounds

Built into twentyten is a new custom background feature. The cool thing is, theme developers can include this feature in their own theme. Simply adding this function to your theme functions.php will add a new menu item to your Appearance menu that allows for quick modification of the background image on the blog.


The Extras

Of course, not everything can fit into the three main areas of feature adds. Some are important and just don’t fit anywhere else.

Admin Username

Many of the security problems that have occurred in WordPress’ history have been a result of the administrative username being admin. This has not been selectable or changeable without hacking the database and changing the admin username there.

In WordPress 3.0, the username can now be selected on install. Here’s a hint…. don’t name it admin. :)

For a complete list of expected changes, see this Codex page.

guest blogging

10 Things You Need To Know About WordPress 2.8

WordPress 2.8 is the latest installment of the WordPress platform, scheduled to be released on Wednesday, June 10. Millions of sites are powered by WordPress including the BBC, CNN, the NFL, the New York Times blogs, and that’s just a few of the big names.

Ok, so there’s a new version.  So what?  There are a number of massive improvements which will make WordPress even easier to use than before, however most of the new features are under the hood. Mark Jaquith, a core WordPress developer, is calling it the “Snow Leopard of WordPress” – in other words, on the surface, it doesn’t have much new but there are radical updates under the hood to make it run faster and give developers more options.

Faster Load Times

The first, of smaller features, but very important features to me, is the ability to compress both external CSS files and embedded CSS, and the same with Javascript, both embedding and external files. Why is this important? It decreases both load time for the user and saves bandwidth because of compression. It’s a win-win situation for everyone. But, this is just one of the major enhancements I’m excited about.

Now Easier to use Widgets

Yay for a new widget panel!  No more “add this widget” and gets added and having to browse the different sidebars.  Now you can drag and drop, and auto-save, on any of the registered sidebars for your theme.  See below for the example of what it looks like.  It’s a lot more useful and much easier to use now.

WordPress 2.8: New Widgets Page

Plugins, Plugins, Plugins, Plugins

The second major update that is clear to see is the plugins page layout.

I run a test site that updates code every few hours from SVN so I can see what is going on with all the new code being developed and committed, so something I noticed quickly was that the Plugins page layout changed dramatically. You’ll notice that the way the plugins are grouped together now is different than it was before. With the upgraded Plugins layout, it was quite difficult to see the important plugins, so the lead developer working on it, Ryan Boren, was kind enough to add a “Per Page” option for Plugins. Now, you can easily find all your plugins on a single page by changing the Per Page option to a higher number than the plugins you have. For example, I have 55 plugins installed, so I set mine to 60 and I can easily see all my plugins.

Plugin Search

Another great addition to the WordPress codebase in 2.8 is enhanced plugin search.  For a long time, and still, plugin search is not that great.  2.8 will help fix a lot of those issues and give users a greater opportunity to find what they are looking for.

WordPress 2.8: Search for Plugins

New Admin Schemas

Diving into some of the admin features, the blue color scheme received some love and has some updated features. The grey color scheme’s icons were also updated. Overall, the admin style has stayed the same though, since Automattic conducted the user experience testing back in October 2008 to draw up a new administration theme. Have they done a good job? I honestly think that yes, they’ve done a great job with it and it’s fully functional now. I was hesitant at first when they made the big change, but I really like it now.

Along with upgrading the admin schema, you can now select how many columns you want to display.  It’s really easy to move the various dashboard widgets around to customize the dashboard to exactly how you want it.   You can easily select which widgets you want to show too.  Whether you care about plugins, recent news, or you just care about posting quickly, you can edit it to your liking.

New WordPress Dashboard

Search for Themes

Not only was the plugins browsing area upgraded, but you can also now view and search for themes!

WordPress 2.8: Search for Themes

Can’t Upload with Flash? Let’s Fix That!

For all those users that were having issues with Flash, Firefox, and uploading images, those problems should go away.  WordPress 2.8 comes with PHP SWFUpload

Editors Note: I wish the Flash uploader would be applied to more than just images. For instance, the WordPress importer could use some love – particularly for large export files.

Automattic Highlights

A few of the highlights that Automattic is pointing out is the new ability to drag and drop, and save, in one action, widgets for your theme. IIS 7.0 URL rewriting is now supported as well, giving a little love to the Windows users. These are just a few of the highlights.

Editors Note: If you use the Thesis theme there are some incompatibilities. Anthony Ferguson has the fix in advance of an official update from DIYThemes.

Upgrading Using the SSH Method

If you’re into really quick plugin upgrades, you might already be using a script running on a cron job that upgrades your plugins every few hours.  But, there’s a slightly less geeky way of doing it.  The SSH2 method of upgrading is now more functional.  It had some problems in 2.7.x, so I helped work with the developer of that area and we made it more functional and operational.  I wrote a tutorial about how to upgrade WordPress and plugins using SSH that works seemlessly.  For my personal blog, I just click upgrade and the next screen I see is that it upgraded successfully.  I never have to enter my username or password.  It’s all stored on the server.

Other Updates

Digging into the nitty gritty, the backend received some updates as well. Dropping some database columns, for those of us that are uber geeky, which will help keep the database running smoother and cleaner. For the full list of geeky updates, check out the Development, Themes, and Plugins updates.

Aaron Brazell

10 Things You Need To Know About WordPress 2.7

The saga of cheatsheets and reference sheets continues with this outline of the hot new WordPress 2.7 which will be released soon. Like WordPress 2.5, this is a radical release. Like WordPress 2.5, the bulk of the changes affect the WordPress admin. Unlike WordPress 2.5, however, this is not merely an update of the backend but a complete rebuilding.

Termed “Crazyhorse” at the beginning of the cycle, the WordPress admin is the result of complete thinking outside the box, research and user testing. The concept began as “Let’s throw everything away that we assume to be proper and correct and see what we can come up with when we have no preset conditions”.

The result is a semantically, aesthetically and structurally different WordPress than you’ve ever known before. This is not your grandma’s WordPress!Vertical Menus

Vertical Menus

The first thing you will notice when you login to WordPress 2.7 for the first time is the new menu layout. Without a doubt it’s going to throw you for a loop and you’re going to hate it. As usual, I’ve run development versions of WordPress for much of the development cycle and let me tell you that this change, early on, almost pushed me away from WordPress – a move that would be earth-shatteringly huge.

Props to Jane Wells, Liz Danzico and the Happy Cog and the entire Automattic team for really creating a sexy interface. The new vertical paradigm is a direct result of the Crazyhorse testing, though, and it has ultimately grown on me.

The navigation is comprised of top-level menu items taking users to the most commonly used pages within the subset. For instance, clicking on Posts will take you to the Write screen. Accessing other menu items in the expandable subset can be achieved by clicking the down arrow for the subset.

Primary navigation items are Posts, Media, Links, Pages, Comments, Appearance, Plugins, Users, Tools and Settings and are intuitively grouped together. The Vertical navigation bar can also be minimized to the left for those that like a pristine feel.


The second thing you will notice, after the initial shock of the vertical menu, is the dashboard. Semantically, the dashboard is extraordinary. By clicking on the gray “Screen Options” button in the upper right, you can gain access to the Dashboard configuration panel where you can check and uncheck the modules you want displayed in your own dashboard. Incidentally, this is also a per-user option now, so each of your members can configure this in a way that makes sense for them.


In addition, plugin authors now have much more flexibility in developing modules (dashboard widgets) for the dashboard, eliminating complicated semantic problems that existed before for developers.

QuickEdit and wp-admin Comment Reply

picture-61WordPress continues to try to make it simple for bloggers to get in and get out with as little impact or effort as possible. Enter the QuickEdit. Besides the fact that every post has quick access links to common activities, there is a new QuickEdit link under each post title on your “Manage” screen. QuickEdit gives you access to most of the “non-content” portions of a post such as author, post title, tags, timestamp, etc.

In addition to QuickEdit, there is also quick comment replying. Yes, this means you can do it directly from within wp-admin. This is particularly useful for people who get lots of comments and prefer to live within their admin screen. The beautiful thing is, by responding in this way, you will feed right into threaded comment replies (which I’ll talk more about in a bit).

Configurable Layouts

Taking a page from the new iGoogle and many years of configuration options from My Yahoo! etc, the entire dashboard and the post write screen can be customized to preference. That means every module and widget can be dragged and dropped, re-arranged and in some cases even removed. This is important because bloggers operate in different ways, have different tendencies and different needs.

For my purposes at Technosailor.com, for instance, Excerpts and tags are very important. As a result, both of these modules are prominently positioned above the fold to the right of the content box. Some themes rely heavily on the use of Custom Fields, so bloggers using these types of themes probably will want to have the Custom Fields quickly accessible.

Note: Plugin authors providing any additional modules to the write screen really need to ensure their plugin is compatible with the new paradigm. In fact, this goes for all plugin and theme authors. Your world has likely been altered. Modules added to the write screen could never be repositioned before, so unless you’ve been developing in parallel to WordPress 2.7 development, your plugin will need to be updated. Also note that the functionality of the plugin itself is probably not affected, but the repositioning is. Nothing that will break a blog, but something that won’t fit in with the new admin concept.

Threaded Comments and Comment Paging

Threaded comments have been around for several years in the form of a variety of plugins. With the advent of commenting systems like DISQUS and Intense Debate, comment threading became more common place. It only made sense that threaded comments would become part of the core offering and denotes the first major innovation to the comment system in WordPress, well, ever.

The core development team didn’t stop there, though. Some folks get crazy amounts of comments per post (I’m looking squarely at Liz and Erin), so to ease the pain of mile long pages, WordPress has created Paged comments. That is, comments can be broken down into groupings of comments for easier digestion.

Note that to use these new features, theme developers will need to now support the new


for comment threading and the




template tags. Review the default theme for example usage.

Media Page

WordPress continues to push ahead on media management. In WordPress 2.5, they gave us a new Flash-based image uploader and galleries. While all this was useful, it was rather difficult to manage images without uploading photos and media into a post (even if that post were to be tossed after the upload was done).


It was also difficult to manage that media after the fact. Which post was this one image uploaded to? Hmm.

Now Media has its own management page, where bloggers can do all their uploading, editing, etc.

Update: It was drawn to my attention that the media page is actually new in WordPress 2.6. False Alarm on this, though the new administrative interface makes it much more accessible and usable than before.

Complete Plugin Installation and Management

Possibly the biggest leap forward for this release is in plugin management. For years, bloggers have asked for a way to manage their plugins without having to use FTP and muck around on the server in an environment they didn’t know anything about.

Regardless of your technical expertise, I’m sure you are going to find the plugin installer a lifesaver. It is now possible to search and browse the WordPress plugin repository from within wordpress admin. Search by tag cloud, keyword search or simply browse popular plugins. Based on the new plugin upgrade technology brought about in earlier releases of WordPress, you can now install a plugin directly as well.

In addition, you can do an entire WordPress upgrade now using this same technique. When you get the nag that a new update is available, give it a whirl. Enter your FTP server, username and password (it’s not sent anywhere!) and do an automatic upgrade. But do make a backup before you try it, just in case something horrible were to happen, as Murphy dictates it sometimes can.

And as an additional bonus, if your server supports the PHP ssh2 PECL module, you can get SSH/SFTP installs as well which is actually even more secure.

The keen eye of the developers among us may have caught the blatant inclusion of PHP5 functionality, a marked – and overt – departure from the PHP4 only mantra that has ruled WordPress development since its inception.

Sticky Posts

Bloggers have been calling for “sticky post” functionality for some time. That is, the ability to designate a post as “sticky” and keep it at the top, regardless of how old it is.

WordPress has now added sticky post ability which includes the addition of the new conditional template tag



Nathan Rice has a fantastic write-up on sticky posts in WordPress 2.7.

Template Tags

As mentioned throughout the previous eight highlights, there are a variety of new template tags.






all deal with the new commenting system. The


conditional tag is used with the Loop,


and sticky posts. Use for styling, perhaps.

Not yet covered is the


tag which will output a list of pages, generally in unordered list format, that can be used for creating stylized page navigation elements.

Finally, yours truly contributed


which I hope is widely adopted by theme developers. Currently,


is included in a theme and is generally a typical form for search. It’s also usually ripped directly from the default theme. It just works.

This behavior remains. If searchform.php exists in the theme, it will be used. However, theme authors can now use the


template tag to do the same thing. And it is pluggable by filter for those who’d like to create plugins that hijack the WordPress default search.

Comments API

Most users will not get the benefit of this immediately, because none of the offline blog editors support this functionality… yet (though the WordPress iPhone app undoubtedly will completely support all of the XML-RPC API, including comments, immediately). However, the API has now been built to allow offline editors like Windows Live Writer or Marsedit to perform comment moderation and editing from an offline client.

With this new functionality, it is in essence opening up even more of WordPress to be managed offline. Desktop apps, web-apps or even mobile devices can now be turned into full featured offline blog management. Score.


I don’t usually offer bonus material. It’s 10 things, right? Right, but this time is different. There is so much under the hood to be excited about, so let me tease you with a little bit of it.

  • New tag management page
  • Close comments on old post
  • Semantic CSS classes throughout
  • Buggy 404 page fixes… Does not report Page not found when a legitimate author archive, for instance, is loaded but the author has no posts. This has been an annoyance to me for years and I finally decided to submit code to fix it.
Aaron Brazell

10 Things You Need to Know About WordPress 2.6

WordPress 2.6 is around the corner (sometime next week, it looks like), and as usual, there’s a bunch of changes, improvements, enhancements that have went into this version. In my opinion, this is an odd major release. While there are certainly major new changes that warrant a new major release, much of the release consists of various improvements generally saved for “dot releases”. Security and enhancement type stuff. The thinking is that WP 2.6 can be released so a WordPress 2.7 can come in the early fall timeframe and integrate new features developed in conjunction with the Google Summer of Code project.

Still though, there is a significant amount of new functionality that I find quite nice.

Google Gears Support

Gears is the Google technology that allows for Firefox (apparently IE 6 too, but I can’t confirm) to “pre-cache” pages and speed up access. Gears has been integrated with WordPress 2.6 on the admin side and speeds things up tremendously. This is particularly important where broadband access is limited or inaccessible (third world, for instance). To enable Gears in your new WordPress 2.6 installation, click on the Turbo link in the upper right corner of your WordPress admin.

XML-RPC Editor Functionality

Quietly, a new bit of functionality snuck into WordPress trunk that threw a number of developers and kicked off an interesting discussion. In the development cycle, XML-RPC and Atom Pub API for remote editing was turned off by default as a “security precaution” since many recent WordPress security issues seem to stem from the XML-RPC protocol.

Daniel took the issue up on his blog in a bit of a vicious manner because he has a vested interest in desktop client support for blogs. He is the developer behind the very nice MarsEdit client for Mac which, incidentally, I’m using to write this post. He took his battle up, a bit more congenially among WordPress developers, and the result was a compromise. New WordPress 2.6 installs would be given the option at install to enable XML-RPC editing and upgraded blogs (pre-existing) ware grandfathered in to an “enabled” paradigm.

Picture 9.png

This is an important shift in the way bloggers think about writing. Most of us simply want to write. We don’t want to worry about the technical aspects of maintaining a blog. This is the philosophy that drove the b5media team, whom I worked for from very early days, to develop a network of bloggers that were able to simply write without worrying about the logistics of maintenance, upgrades, monetization, etc. Unfortunately, while most bloggers are not technical, malicious parties ‘out there’ are technical and look for any opportunity to attack blogs and other websites. XML-RPC and APP provide a vector which, though pretty secure, has seen its share of exploits in the past. Disabling functionality that is not explicitly used by every user makes sense for security reasons.

Bloggers can enable or disable the functionality via the Settings > Writing page in WordPress admin and most desktop editors still only support the XML-RPC protocol so unless you’re explicitly using the Atom Publishing Protocol, you’re probably safe to leave only XML-RPC checked.

Post Versioning

Developers familiar with Subversion, or SVN, understand the concept of versioning and diffs. Compare one file, or revision, against another file, or revision, and see a breakdown of differences between the two. With the help of GUI tools, developers can see a color-coded red vs. green (removed vs. added) presentation.

This concept has now been applied to posts so you can view differences between posts as well as “revert” to an earlier version of a post. I absolutely love this feature and you can see an example of a “revision compare” built directly into WordPress.

SQL Security – $wpdb->prepare()

Back in WordPress 2.3, the


first emerged, initially unused… but there. The method was very experimental at the time and was not ready for prime-time so, though it was included, it was not yet used. We started to see its emergence in WordPress 2.5 and in WordPress 2.6 it is being used just about everywhere.

The idea behind


, if you’ll allow me to get geeky for a minute, is to sanitize SQL in such a way that SQL injection is prevented. So, plugin developers, in particular, should be happy with this method (part of the


class). Not only should they be happy, but from a best practice standpoint, you should be using it.

In my opinion, this should be a part of a “dot release” and not as a major feature of a major release.

Shift-Click Selection of Multiple Checkboxes in WP-Admin

As the backend of WordPress continues to evolve after the release of the drastically redesigned admin in WP 2.5, usability enhancements are also making their way in.

One of the better usability enhancements added in WordPress 2.6 is the ability to “shift click” to select multiple checkboxes at once. Say, for instance, you want to clean up an unwieldy category system (as I need to), Simply navigate to your category management page, click on the first category you want to delete, for instance (posts will go into the default category), and “Shift-click” on a checkbox farther down the list. Magically, all checkboxes in between will also be selected.

This, of course, works anywhere where checkboxes are employed in the WordPress admin.

More Avatar Options

With the Automattic acquisition of Gravatar last year, in-built support for Gravatars was introduced in WordPress 2.5. WordPress 2.6 gives the blogger more options by allowing for selection of the “default” avatar. Out of the box, the default Gravatar can be “Mystery Man”, a generic grey avatar with a white silhouette of someone. Default avatars can also be “blank” (self-explanatory), the Gravatar logo, Identicons, Wavatars or MonsterIDs. These have all been a part of WordPress.com for some time and now come to the rest of us. For more information, Matt wrote a post for the WP.com community that you should probably check out. The difference here being, of course, that WordPress.com offers “dashboard avatars” and WPFROU (WordPress for the Rest of Us) does not include this functionality.

Page Templates over XML-RPC

In addition to the XML-RPC/APP security measures listed above, a new key bit of functionality has now been exposed for API editors (and also, if you think about it, demonstrates the power behind XML-RPC and why you might want to turn it off if you don’t use it). The XML-RPC interface now allows for managing page templates from an API editor. To the best of my knowledge, no editor supports this yet and may not. However, increasingly there is the ability to remotely post content from places like YouTube, Utterz and others. None of these services would have any real use for this functionality either, however I want to point out that because they can post remotely anything that is exposed to the remote world can also be managed.

It’s also conceivable that an offline WordPress client could be built that replicates WordPress admin in a desktop client, and this is one more step in that direction.

Press This

Press this! is a new enhancement of a long-existing concept. Bookmarklets. In fact, WordPress used to have a bookmarklet included that would allow a user to quickly start a new post from the browser toolbar, but the functionality was limited.

The Press This! functionality rocks, actually, because it allows the user to be on any website, click the bookmarklet and get a miniaturized version of WordPress admin with options to snip text, photos from the page, quotes or video embeds.

Picture 10.png

Obviously, we can lead you to water but we can’t make you drink. BE VERY CAREFUL OF COPYRIGHT VIOLATIONS! Oh, and the Associated Press sponsored this. (kidding!)

Integrated Theme Preview

Theme previewing has been a bugaboo for many a theme designer. How do we check and develop without affecting the rest of the site. Some folks resorted to using Ryan’s venerable Theme Preview plugin. Others setup a beta version of a site that was sandboxed off from the rest of the world. Lots of different approaches, all of which remain valid.

However, for theme developers and bloggers looking to see how a theme will look on their site, with their content, there is now theme preview bling. When you are on your Design page, click on one of the theme screenshots and your site will be loaded in a lightbox-like overlay to allow you a live preview. Heavily inspired, I’d imagine, by the Mac OS X Leopard Quick Look functionality.

Remember when Technosailor looked like this?

Picture 11.png

Plugin Management Overhaul

Finally, the plugin management interface has received a face-lift and some added functionality. Active plugins and inactive plugins are segregated and with that new fangled Shift-click functionality I talked about before, plugin management just got really freaking simple. Note that Active plugins can be deactivated in bulk and Deactivated plugins can be activated or even deleted in bulk. Clean up that stale plugin list in a snap. But… there’s always a but… make a backup before you go nuts.

Aaron Brazell

Solving the WordPress Traffic Overload Problem

Anyone who’s been around WordPress for a “Digg effect” or other massive influx of traffic knows that it can be a real problem. From a technical standpoint, the problem is that PHP is entirely loaded into memory for every pageload. That includes the 99% of PHP that is not being used to actually render the page.

On low traffic sites, this problem is not necessarily noticed. It doesn’t have a huge impact. However when there are hundreds of requests hitting a server in a single second, that kind of overhead builds up very fast.

There are solutions to this sort of thing and depending on what the scale of the environment is, some might be more excessive than necessary. The WP Super Cache plugin is a quick solution that will cause pages loaded on WordPress to be cached meaning that if subsequent page loads can pul the HTML from the cache without having to load the overhead of PHP as well, everyone wins. On the more extreme end, server configurations can be made to send requests for different types of content (for instance, images) to specialized servers optimized for that content type.

Very geeky stuff. It’s important to note that WordPress gets a black eye all the time for it’s caching mechanisms and ability to handle the load of a “Digg effect”, etc. In fact, Instapundit Glenn Reynolds is the latest to take a stinging swipe at WordPress and trust me when I say, we heard it loud and clear.

At b5media (where I’ll be leaving as the Director of Technology soon), we’ve had to deal with this as well and have managed to develop really sound solutions to some of these problems. However, for WordPress as a whole, it is a well recognized problem that not everyone can solve by following in our footsteps (or WordPress.com footsteps).

We’re going to do what we can to help solve this problem once and for all as two of our developers, Mark Jaquith and Brian Layman will be mentoring a Google Summer of Code intern to develop a robust caching engine for WordPress. We hope that this exercise will result in a more reliable (and sane!) caching mechanism.

Integrated Caching Solutions will improve WordPress’s speed and reliablity out of the box and allow people to “Digg Proof” their sites without the struggle of installing plugins on a site that is virtually unreachable. (Source: WordPress Google Summer of Code 2008)

Glenn, I hope that the work that Mark, Brian and our intern will be doing will improve the WordPress problem. In the meantime, let me know if I can help you with anything (though I believe you are using Movable Type). It is a known issue and it’s one that needs to be solved and hopefully some steps can be made toward that this summer.

Aaron Brazell

10 Things You Need to Know About WordPress 2.5

WordPress is about to release version 2.5 into the wild (It just hit Release Candidate yesterday so the release date, though officially not known, is coming soon). If you’ve been using WordPress.com or have peeked at the demo site you will know the biggest change coming to WordPress with this release.

You might ask, “Where did WordPress 2.4 go?” The answer to this is that it was skipped. Yes, that’s right, the 120-day release cycle was scrapped this time and you essentially have two releases in one. Again, the changes are vast and countless. This is a huge release.

So let’s get into the nitty gritty shall we?

New Admin User Interface

WordPress 2.5 GUIBy far the most comprehensive change in this release was the complete rethinking of how WordPressers do their administrative tasks. Happy Cog Studios was enlisted to do usability research and testing – with the emphasis being on usability research. Several of the items in this rundown are going to be broken into their own list item as they deserve their own description and, again, this upgrade is huge.

You’ll notice that the WordPress admin is now bathed in a lighter blue, lighter grey and orange color scheme. I like the nice hues, but others are bound not to. If you’re a developer or know your way around creating WordPress plugins, you can supply your own admin CSS with the




filters, and WordPress is already supplying per-user options of “Classic” – the old dark blue feel – and the “Fresh” style which is installed by default.

function my_admin_css( $cssfilename )
    // Use name of the CSS file inside the wp-admin folder WITHOUT the file extension
    return 'my-new-wp-admin';
apply_filters('wp_admin_css', 'my_admin_css');

I’d just stick with the default though. It’s not too shabby.

Menu Layout

WordPress 2.5 Menu
One of the first things you’ll notice is the change in the administrative navigation. It struck me as very Movable Typeish. I don’t know if the idea came from them or simply that Happy Cog had such thorough user research that it made sense. Either way… it makes sense.

Primarily, users interact with the WordPress admin in one of four areas – writing posts, managing posts, managing comments, and managing design elements. You’ll notice that these items make up the primary navigation on the left side of the screen. (Sidebar: You’ll also notice that the Presentation menu has been renamed Design – which was a usability decision. It makes sense.) Matt wrote more about this.

The rest of the formerly Primary navigation items – Plugins, Options (now Settings) and Users have been moved to a secondary navigation on the right side of the screen.

Sub-navigation is something that’s a little weird. As both the Primary and the new secondary navigation used to be part of the same menu bar, the “submenus” all made sense to appear below the primary navigation. This is still the “right” place, I believe for the new Primary navigation points but seems awkward for the Secondary navigation items that are relegated to a different portion of the screen. I know this is something that is currently being thought about, I just don’t know what the final results will be.

Also, as a bit of additional commentary, I think plugin authors need to go back and revisit their choice of where they have put their plugin subpages. Do they really make sense to be in the Options page (now Settings)? Do they really belong in the Manage page? In my opinion, plugin settings pages should be listed as a sub-page of the Plugins menu.

Widget Handling

WordPress 2.5 Widget MAnipulation
Another MASSIVE shift in philosophy has been in the Widgets page. Before, you could drag and drop widgets into position. You can still reposition widgets by dragging within a sidebar, however, WordPress is relying less on Javascript “bling” for this release. Each widget is listed in a column on the left, you click the Add link and it jumps into the sidebar. Instead of having all sidebars displayed at one time, the user selects the sidebar from a dropdown to expose a different sidebar.

To me, this adds work to the overall experience, and so fundamentally I don’t like it, but it feels more reliable.

Dashboard Overhaul

WordPress 2.5 Dashboard Overhaul
The second thing you will probably notice immediately on login to the WordPress admin (the color scheme being the first) is the new dashboard interface. Now it is completely modularized, and though there is no “tight” way of adding your own, plugin authors can create their own dashboard widgets. The architecture is primitive at this point, but will improve offering a much easier way for plugin authors to do their thing without feeling like they are “hacking”.

A summary of your entire WordPress install is summarized in a widget titled “Right Now” informing you of the number of posts, comments, draft posts, tags and categories. Other useful widgets like incoming posts, etc are available and can be customized with your own RSS feeds.

Visual Editor Improvements

WordPRess 2.5 TinyMCE Improvements
The Visual editor, a long time bane of many users existence, has been upgraded with support for TinyMCE 3. It even includes Full Screen mode for those of you that don’t like to be distracted when writing. I cannot speak to the ability of this upgrade, as I don’t use WordPress’ visual editor, but I’m told it is a vast improvement over the older version. The TinyMCE team has worked closely with WordPress on this release as well.

Flash Uploader

WordPress 2.5 Flash Uploader
For those of you using a lot of images in your post, the image uploader has been completely overhauled as well. Namely, you can uplopad and insert multiple images at once via a new Flash-based uploader. This will gracefully fallback to the original uploader if Flash is not installed, so never fear. There is now a new “Add Media” link in the header of the post window that handles all this now. For those of you who want to debate the philosophical decision to include closed source Flash into open source, and GPL’ed WordPress, knock yourself out.

Plugin Auto-upgrade

An ambitious new feature that is being included in WordPress is a new autoupgrader. By default, it will try to upgrade plugins that are already in the WordPress plugin repository by writing the new files out to the existing plugins. however, this is an inherent security risk as it would require your plugin files be writable by the world. So the fallback is to upgrade plugins via FTP/FTP over SSL. Though your FTP username and password are stored in your database, it’s important to remember that FTP is inherently insecure. FTP/SSL is much more secure but is still not the best. Thanks to hooks in the filesystem functionality, I’ll be releasing a plugin that I’ve been working on for Secure FTP (FTP over SSH). It’s not ready yet, but hopefully will be soon and I’ll let you know when it is.

Custom Sizes for Thumbnails

WordPress 2.5 Thumbnail Sizes
Since the image uploader was added back in, something like WordPress 2.0, many, many people have complained about the inability to modify thumbnail sizes. I believe the old default was something like 100×100. In WordPress 2.5, thumb-nailing became a whole lot more useful. You can not only set your thumbnail dimensions globally, you can also have a “medium” sized thumbnail, a la Flickr and an option to crop an oversize image instead of just resizing. I figured some of you would like that.

Tag Management

WordPress 2.5 Tag Management UI
With the introduction of WordPress tags in WP 2.3, the development group took a measured approach to adding user interface around them. A minimal form field on the post write page allowed for a comma separated list of tags with no additional way of management. Fortunately, in 2.5, a bit more UI was added, though functionally identical. It works like Flickr tags where tags can be added via a list of comma separated tags or via a “type, click, add” mantra. In addition, the UI has a tabbed interface which allows for the selection of tags by checkboxes and by most used tags, useful to say the least.

Password Strength Too

WordPress 2.5 Password Strength
The last major item (and trust me there are tons of smaller items or more obscure items) in the list of things you should know about WordPress 2.5, is the password strength meter. Passwords should be at least three characters or they will be deemed “too short” and should consist of two of three types of characters – letters, numbers or symbols – or will be considered too weak. Password security is a big concern for everyone in IT and blog security itself could be beefed up significantly by users choosing “strong” passwords.

Bonus Item: Timestamp Sanity

WordPress 2.5 Timestamp ManagemtThanks to Mark Jaquith (Disclaimer: Mark is one of my employees at b5media, but is also a core developer of WordPress), the timestamp functionality of WordPress has recieved a complete overhaul. By default, a new post has no timestamp module. Instead, it’s a publish immediately, or you can click a link if you really do want to modify the timestamp. When editing a post with a timestamp, there is also no “Modify Timestamp” checkbox that caused so much confusion for so many years. If you modify the existing timestamp, it’s assumed that you actually want to change the timestamp! In other words, WP is no longer insulting the intelligence of users (not that it was an intentional insult before, but the big brother protection from the blogger’s own self was a bit tedious).

So if you feel like testing, you can grab a copy of the lastest trunk code at


. The usual disclaimers are in play when using a non-stable released version: No support offered, your mileage may vary, use at your own risk, don’t feed the tigers. But if you want to contribute to the development process, testing AND reporting bugs is a good way. A lot of testing is going on right now before a release, so have at it. :-) Enjoy.

Update: Ozh describes how to create your own wp-admin stylesheet.

Aaron Brazell

10 Things You Need to Know About WordPress 2.0

If you’ve been seriously blogging for any bit of time at all, you’ve heard of the juggernaut that is WordPress. WordPress, of course, is the most popular self-hosted blogging platform utilized by independent writers. The official launch of WordPress 2.0 is upon us and, no doubt, the blogosphere will be buzzing about its launch. As a tester of the product since the early days of the WordPress 2.0 alpha builds, I’ve watched, participated and even assisted in the development of this software.

While this entry might get a bit technical, it is only because thecoolest new features are under the hood. For new users who don’t feel like tinkering with code and expect a shiny new piece of software out of the box, fear not… you will not be disappointed. The software provides a much more interactive and user-friendly interface. And for those of you who love the color blue, you’re going to love the new admin panel!

However, if you want to get into the real glorious nitty gritty of what you can do, then read on!

Here are ten things you may or may not know that can be extremely beneficial to know about WordPress 2.0….

  1. Thumbnails of Downloaded Themes – In the past, whenever you’ve gone and looked for a shiny new theme for your WordPress blog, you might have had the luck of seeing the theme in action. However, I can’t be the only one who has looked at a theme created 6 months earlier and wondered what it looked like on a blog because the author had changed it since publishing. With WordPress 2.0, theme authors are being encouraged to include a screenshot, entitled screenshot.png, in the theme folder. By doing so, the thumbnail will be loaded for the blogger to see in his theme list prior to enabling!
  1. Capabilities and Roles – In previous versions of WordPress, users could be given ‘limited’ permissions by assigning user levels. User levels, in the past, have relied on a scale 0 to 10, with 10 having unlimited administrative permissions. Various levels in between allowed ‘guest’ bloggers or contributors to have appropriate rights on your blog. In WordPress 2.0, this has been completely revamped. Without going into a lot of repetitive details on the nature of the various capabilities (Ryan explains capabilities and roles in great detail), the new features open up a whole new avenue of flexibility for plugin authors.For instance, there is an API function called 

    , which allows the plugin author to match a currently logged in user against a list of capabilities. These capabilities range from ‘moderate_comments’ to ‘publish_posts’. Ryan’s article has the entire list, but it can also be found at the bottom of the wp-admin/upgrade-schema.php file.

  2. Importing from Other Blogging Platforms – As WordPress becomes an even bigger entity with a higher profile, it’s likely more defectors will want to migrate their existing Blogger, Moveable Type or other style blog to WordPress. I certainly wouldn’t blame them. Old-style import scripts that were included with WordPress have been scrapped for a couple reasons. For one, the other platforms have changed over time and the importers no longer work or the changes to WordPress over time have required a new approach to getting user data into WordPress accurately and effectively. There’s also the little detail of shoddy or incomplete code.

I, along with others, have taken to creating easy upgrade paths for folks coming from Textpattern, Blogger and Moveable Type. If you’re not on one of these platforms, but still want to come over to WordPress, the core software also permits import from an RSS feed!

As a bonus, for readers who have been monitoring the merger of b5media and About Weblogs , you might be interested to know that the tool of choice is a custom Nucleus CMS importer that ultimately will be submitted to the WordPress core code. But that won’t make this release!

  1. Built In Caching – Caching is the idea of storing files for quicker page load time. The concept as a whole is not new. Browsers cache all the time. Internet Explorer uses Temporary Internet Files and Firefox has its own cache. These help individual users load pages faster, but does not help a site load faster across the board. With WordPress 2.0, caching is built in. Queries to the database are saved because, if a page or setting has been loaded once, it is stored on the server file system for quicker load for all users.This is generally beneficial but can also cause problems, particularly if you wish to move your blog from one folder to another (For instance, if you have had your blog in http://example.com/blog and wish to move it to a new folder such as http://example.com/wp). Because database options have been cached, WordPress still thinks it is at another location.To get around this, edit wp-config.php and add the following line before the closing ‘?>’.
    define('DISABLE_CACHE', true);
  2. Image Uploading – In previous version of WordPress, there was an “Upload” feature available through the admin menu. That menu item is no longer. It has been replaced with an uploader on the edit page. In theory, bloggers can upload images and then drag-and-drop the image into the post. Unfortunately, this feature has caused much heartburn for some testers. There are options to use a full-size image or a thumbnail in the entry, but either way in pre-release versions, this feature seems to be iffy at best with various platforms and browsers.  This will probably be an item that is improved upon, but for the time being, manually editing the HTML with specified dimensions is best practice.Also note that dragging and dropping images when not using the Rich Text Editor will only create a permalink to the image.
  3. Use WordPress for Social Networking – There are probably a thousand social networking tools out there – many of which have plugins for WordPress available to them.  Someof these are Flickr , del.icio.us or Digg.  However, WordPress has built-in integration with such a tool in that allows search engines understand your relationships with other bloggers.  It is called theXFN (XHTML Friends Network).  XFN allows bloggers to establish links in their link manager (blogroll) as “friend”, “co-worker” or “crush” among others. It even allows you to designate whether you’ve physically met the person.
  1. Hooks and Filters – Hooks and Filters are a boon for plugin developers. They are what allows plugin developers to modify the behavior of WordPRess without actually changing the core files. Of course, filters and hooks are not a new concept… there’s just more of them in WordPress 2.0. Filters are functions that do as they suggest – filter. Items like a subject header can be filtered through to create an effect or change the way an item is displayed. Hooks give the developer a way to ride the coat tails of an existing “element” (such as a header or the rendering of a post, etc) and perform an action of some sort. An example of this would be to have someone emailed whenever publish_post occurs. (Of course, this is already something that can be done so it is a poor example).
  1. Built in Anti-Spam – WordPress 2.0 now ships with Akismet, a built in spam-filter. I’ve been using Akismet spam filtering since October 25th, the day it was launched and I have had one spam comment make it through to my moderation queue. There are alot of other plugins that do spam filtering, but in the past it has often required blogs to use two or more plugins just to get a good grip on comment and trackback spam. There is one hitch though.  Akismet users will need to register for an API key in order to use it. It’s free and worth it.
  1. Don’t Use the Rich Text Editor – WordPress developers will likely scorn me when they read this, but it’s my entry, right?  WordPress 2.0 includes TinyMCE, a javascript Rich Text Editor that gives bloggers a familiar Microsoft Word-like editor complete with common shortcut keys like Ctrl-B for Bold, Ctrl-I for Italics, etc.There are a couple problems I see, as a web purist, with this approach. TinyMCE, though it will probably continue to be improved, creates really shoddy HTML in some cases. Empty tags, funky cut-and-paste, and the now-internally-infamous shoddy image feature makes it great for quick and dirty entries but poor for day-to-day usage. I don’t use Safari, the preferred browser for most Mac users, so I can’t be sure if it works yet for you Safari users, but last time I recall it didn’t.
  2. WordPress as a Content Management System – Suppose you like WordPress as a blogging tool and you wish to use it to run non-blog sites. This is a distinct possibility, and not necessarily WordPress 2.0 specific. In fact, I’ve been doing this for the past few years in one form or another.Let me give you an example of one such site. My father is a pastor at New Covenant Community Church in Audubon, New Jersey. (Feel free to visit. I’m sure he won’t mind!) This site is completely WordPress 2.0 driven and it doesn’t even resemble a blog! The question is, how did I accomplish this?Well, there’s a couple of things I did and I’ll bullet point them for quick reference.
    1. Because we wanted the front page to have a different layout than the rest of the site, we created a special template file called NCCC_Main_Page.php. To make it usable for our front page, we needed to add this block of code near the top (after the opening ‘<?php’)
      Template Name: NCCC_Main_Page
    2. We created a “page” with our home page content and selected the NCCC_Main_Page  template from the Page Template drop down.
    3. We then downloaded the Static Front Page plugin and followed the instructions to install it.
    4. We created the content for our home page and assigned it a page slug of “home” (Note:this is most easily done by assigning the page title of home and then changing it to something more useful after publishing)
    5. Because most non-blog sites, including NCCC’s, have a manageable number of pages, we were able to create Entries in WordPress and create a static menu using the entry permalinks. There are built-in functions and plugins to make larger amounts of content more manageable and automatic.
    6. As a bonus, we did create a non-blog blog of “Upcoming Events” by posting under a specific category. The permalink to this page was a mere category archive permalink with the specific category used in the archive call.  This provides added benefit of enabling an RSS feed of upcoming events.