Plugins

Unit test WordPress plugins like a ninja (in progress)

Unit testing a plugin can be easy, but if the plugin needs dashboard configuration or has dependencies on other plugins, it can quickly go off the tracks. And if you haven’t setup Travis integration, you’re missing out. Activate Travis CI To start with, go sign in to Travis now and activate your repos for testing. If you’re […] » about 300 words

Happy New Scriblio!

The most recently released, stable version of Scriblio is marked 2.9-r1 and was last updated in June 2010. You can be forgiven for thinking development had ceased in the interim. Today, however, I’m proud to introduce a completely new Scriblio, re-written from the ground up to take advantage of the latest features of WordPress and eliminate the mistakes […] » about 600 words

Plugin Options Pages in WordPress 2.7

WordPress 2.7 requires that plugins explicitly white list their options using a couple new functions. WordPress MU has required this security measure for a while, and it’s nice to see an evolved form of it brought to the core code. Migrating Plugins and Themes to 2.7 article in the codex offers some guidance, but here’s how it works:

First, register each option for your plugin during the admin_init action:

``` function myplugin_admin_init(){ register_setting( 'my-options-group', 'my-option-name-1', 'absint' ); register_setting( 'my-options-group', 'my-option-name-2', 'wp_filter_nohtml_kses' ); } add_action( 'admin_init', 'myplugin_admin_init' ); ```

In the example above, the value for my-option-name-1 will be filtered by absint before being saved to the options table. my-option-name-2 will be stripped of any HTML by wp_filter_nohtml_kses.

Then build a form like this prototype:

``` ```

Easy.

WordPress Event Calendaring Plugins

I actually use Event Calendar, which has been abandoned for some time. Looking at the alternatives listed in the Plugin Directory, Calendar, Events Calendar, and Gigs Calendar add full calendar management features to WordPress. While ICS Calendar, iCal Events, and Upcoming Events, simply offer the ability to display calendar data from elsewhere.

What I liked about the old Event Calendar plugin is how events were posts. Creating an event started with creating a new post. Searching and browsing events was the same as for posts. I haven’t yet tried any of the alternatives, but if none of them treat events as posts, I may find myself re-working the old plugin for better compatibility with current WordPress.

WordPress Survey Tools

Lorelle and Samir both point to a number of plugins to do surveys within WordPress, but neither of them say any of them are that good. And Samir is pretty disapointed: “at the end of it all, I never did find my ideal online survey tool.”

Survey Fly is the best recommendation from both of Lorelle and Samir, but it isn’t WP2.5 compatible and was las updated in summer 2006. It’s also limited to tracking only one survey at a time. Ugh.

bSuite 4 beta 2

I announced the bSuite 4 public beta not long ago, now I’ve just posted a new version to SVN that addresses some of the bugs and fleshes out some of the features. I have yet to update the bSuite page, but here’s a preview of what’s new or changed:

  • Additional stats reports
  • WP2.5-style tag input tools on the Page edit screen*
  • WP2.5-style category selector on the Page edit screen*
  • WP2.5-style excerpt input on the Page edit screen*
  • For multi-author sites: ability to grant edit permissions by role for each page (with a configurable default)
  • An “include” shortcode that makes it easy to show content from one post or page on another.

About the new shortcode, use it like this:

[include post_id=“1234” url=“a url to a post or page in your blog” field=“post_excerpt”]

One of post_id or url is required; field is optional and defaults to post_excerpt first, then to post_content if there is no excerpt.

*Why would you want to input tags, set categories, or add an excerpt to a Page? They help readers find and explore our content. What’s so wrong with that?

Interesting WordPress Plugins

WP Contact Manager turns WordPress into a contact manager. It’s a combination of theme and plugins (including Custom Write Panel) that allows you to enter and manage contacts as blog posts (familiar, eh?). Use Members Only to secure access.

TDO Mini Forms “allows you to add highly customisable forms to your website that allows non-registered users and/or subscribers (also configurable) to submit posts. The posts are kept in ”draft“ until an admin can publish them (also configurable).”

bsuite_geocode Plugin For WordPress

I’m a big fan of the WP Geo plugin, but I want more. My biggest complaint is that I want to insert coordinates using Google Maps or MultiMap URLs, rather than insert them in the modified story editor. So I wrote a bit of code that reads through the URLs in a post, finds the […] » about 400 words