WordPress-ish JavaScript Code Standard – ESlint Config

I’m spending a lot of time with JavaScript these day, and find linting tools to be invaluable for spotting some mistakes. I started off with JShint plugged in to Sublime Text via this JSHint plugin.

More recently I’ve switched to ESlint. It seems to identify more issues and formatting problems than before, is easy to configure, and is also extensible.

I’m gradually tweaking an ESlint configuration file that somewhat matches the WordPress coding standards (with some of my own amendments), and thought I’d release it here:

It’s not perfect yet by any means, so make of it what you can. Hopefully it will improve with time.

PageView 1.5

So my second plugin update in a week, quite a record this year! This time it’s one of the oldest plugins on this site (the readme.txt file said it worked on WordPress 1.3) – PageView.

Enough people were still writing in, all asking the same question – can I make it borderless. Now you can. The plugin has taken a leap into 3.0 and uses the shortcode API, and strips out the stuff that wasn’t being used, while adding a bunch more flexibility.

Redirection 2.2

I’ve just committed a new version of Redirection to trunk on the WordPress.org plugin repository. This isn’t available for auto-download just yet as I want to make sure any problems are ironed out. If you’re a willing test subject then I’d very much appreciate any feedback. The code is running on this site and hasn’t melted anything (yet).

There is little visible difference between 2.2 and 2.1.29, but internally there has been a big cleanup. Large amounts of compatibility code has been cleared away, some of it going all the way back to WordPress 2.3. I’ve optimized the database where possible, and hopefully fixed the annoying bug that surfaced when WordPress 3.0 came out (automatically redirecting your home page is not so good!)

Anyway, the changelog for this version is as follows:

  • Add Dutch translation
  • WordPress 2.9+ only – cleaned up all the old cruft
  • Better new-install process
  • Upgrades from 1.0 of Redirection no longer supported
  • Optimized DB tables

You can grab the new version from SVN:

http://svn.wp-plugins.org/redirection/trunk

If you have time there’s a short survey in the plugin that asks a few questions about how you use it. My aim is to simplify it and focus on the things people actually use, and the only way to do that is find out. You can also take part in the survey directly.

Related Thumbnails with YARPP

I’ve been using YARPP (Yet Another Related Posts Plugin) for some time to add a short list of related links to the end of all posts on this site. The plugin works great, and is written by the capable Mitcho (who gave a very good presentation at WordCamp San Francisco).

I was thinking about the post thumbnail feature of WordPress and wondered if I could get thumbnails to appear instead of text links. A bit of searching later and it seems I wasn’t the only one to think of this, but I thought I’d give my take on it, and explain how I ended up with something that looks like this:

Continue reading “Related Thumbnails with YARPP”