A Case of a Weak Escape

All of my plugins should now be WordPress 2.8 compatible. For the majority of them the only issues involved were based on the use of the WordPress SQL escaping function. Previously I was calling this statically:

wpdb::escape

A bad habit I probably picked up from somewhere back in the WordPress 1.5 days that has stuck around. In WordPress 2.8 this function no longer works statically. The simple fix is to change it into:

$wpdb->escape

I’ve mentioned this here in case it’s useful to anyone else experiencing a PHP error along the lines of:

Call to undefined method _weak_escape()

A preferable change will be to make use of the new SQL prepare functions: Data Validation.

In other plugin news I’ve add a Geo IP locator service to this site, which is now used internally in my plugins for mapping an IP address to a location. Quite a fun excerise, and one less reliance on external services (which have a tendency to change without you noticing).

All About Email

I’ve been doing a bit of work recently for Automattic, culminating in Post by Email. If you’ve not seen it yet it’s a nifty way of publishing a post to WordPress.com by sending an email. Text and attachments are all converted into a WordPress post, and everything works just as if you’d typed it into a browser. All told a very quick and simple way of publishing and it’s been a lot of fun (and frustration) to develop.

Talking of which, the pace of development at Automattic is really quite astonishing and there’s a lot of very exciting stuff going on. From a technical point of view I never realised just how deep the rabbit hole goes. From a user’s point of view this is exactly how it should be.

Guangzhou Theme

I’ve had a lot of queries about the theme I’m using on this site and I’ve so far answered that it’s a work-in-development and not quite ready yet. I’ve finally spent some time cleaning it up and before making it publicly available I thought it wise to give it a quick testing cycle. As such, if anyone wants to beta test the Guangzhou theme then drop me a line and I’ll send it on over.

The theme requires WordPress 2.7 or 2.8, and there’s sister theme for bbPress 1.0 (alpha). You will also need a login to this site so I can give you access to the private bug tracker. While the theme has been in use for the better part of year it has been targeted at my own requirements and I’m sure that there will be some changes needed to open it up. Saying that, it is very customisable and allows very tight integration between WordPress and bbPress, as well as Sniplets. It’s fully localised, and if you use a plugin like WP Minify then it will also seamlessly allow you to reduce CSS and JavaScript overheads to a minimum.

WordPress CodeSniffer Standard

CodeSniffer is a PEAR package that checks PHP code for violations of coding standards. According to the developers:

It is an essential development tool that ensures your code remains clean and consistent. It can also help prevent some common semantic errors made by developers.

While it won’t make you bug-free, it is another tool to help you produce better quality code, and is very useful when working with a team of developers. CodeSniffer thoughtfully comes with several standards to verify code against the PEAR, Zend, and Squiz coding standards. What follows is a CodeSniffer standard that adheres to the WordPress Coding Standard. Hurray for coding violations!

HeadSpace 3.6.21 – WordPress 2.3, 2.5, and 2.8

HeadSpace 3.6.21 has just been released and is in preparation for the upcoming WordPress 2.8, fixing several issues with tagging. In addition to this it also restores compatibility with WordPress 2.3 and 2.5. I’d be interested to know how many people are using older versions of WordPress (more than one major version) and whether this feature is of any use.

Also included in this version is a raw footer module that allows you to add anything to the wp_footer area of your theme.

HTML Purified – WordPress & bbPress

I’ve just released an update to HTML Purified, a plugin that replaces the standard WordPress KSES filters with the much more powerful HTML Purifier library. This release tidies up a few rough edges and is jointly compatible with both WordPress and bbPress.

That’s right, the same plugin will work with both systems and allows you to fully protect yourself from any malignant comments that may be directed at your site. It should also ensure that your comments are valid XHTML.

Note that bbPress functionality is experimental. It works on the support forum here, running bbPress 1.0 alpha 6. Your mileage may of course vary.

WordPress SEO Plugin Comparison

Cary Hat I realized that I’ve added a lot of functionality to HeadSpace without actually making any kind of announcement about it. To make up for this this I decided to produce a comparison chart showing HeadSpace in relation to other popular SEO orientated plugins. This is not a chance to poke competitors in the eye but just an attempt for me to show exactly what HeadSpace can do and how it stacks up to other plugins. It’s also a good excuse to make sure I can tick as many boxes as possible – HeadSpace is now in its fourth year and although development is still going strong, it is easy to get stuck in your own world and not see what is happening outside.

Note that while I have tried to keep the comparison objective, this is my site and naturally I am biased.

This comparison will look at:

  • HeadSpace
  • All-In-One SEO (AIO SEO)
  • Platinum SEO (a derivative of All-In-One SEO)
  • wpSEO
  • SEO Title Tags (not really the same type of plugin, but was included due to it’s very good titling features)

Localization Thanks

I try and make a point of localizing all software I produce so that it can be used by as many different people as possible. Last year I wrote some articles (Translating WordPress Plugins and Localizing WordPress Plugins) detailing how to localize a plugin and theme from both a developers and translators point of view. Since then my plugins have been receiving a steady stream of translations and I’d like to take this opportunity to thank everyone who’s not only helped produce translation but also pointed out areas of my code that were not yet localized.

Querious

A few days after I wrote about Sequel Pro, a link from Daring Fireball leads me to Querious, a commercial MySQL management tool. At a glance it seems to offer everything that Sequel Pro has, along with the ability to manage users and permissions.

Hot on the heals of this The Apple Blog has a Sequel Pro vs. Querious showdown. The conclusion is similar, and the comments make for interesting reading with links to further tools.