Archive for May, 2011

Basic Google Maps Placemarks Plugin

by Ian Dunn

I wrote a new WordPress plugin for a side project and just released it into the repository . It creates a custom post type for markers and then inserts them into an embedded Google Map, using the post’s featured image as the map icon. Note: all support requests should be posted to the support forums .

Custom Post Type Fields Overwritten

by Ian Dunn

The past few days I’ve run up against a weird bug in a plugin I’m writing, where the custom post type fields would be overwritten with empty values randomly. Creating or editing a post would save the values fine, but I’d come back 5 minutes later and they’d be empty. I finally got it sorted,… [more]

Parse Error When Installing WordPress 3.2 on a PHP4 Server

by Ian Dunn

This is the error you’ll get if you try to install WordPress 3.2 on a PHP4 server: Parse error: parse error, unexpected T_VARIABLE in /path/to/your/directory/wp-includes/load.php on line 566 It’s because the clone keyword doesn’t exist in PHP4 .

admin-ajax.php Response Fails When Called from Domain Alias

by Ian Dunn

I’m writing a WordPress plugin that uses AJAX and I had everything setup and working fine for awhile. I came back to the code a few hours later and all of the sudden I was getting a failed response, even though the code hadn’t changed. I got the correct JSON response when I loaded the… [more]

What Really Makes a Password Strong?

by Ian Dunn

Bob Yexley turned me on to passphrases a few years ago when he linked to what became a seminal article on the topic by Robert Hensing. The argument is that passphrases (e.g., the future is unwritten) are both more secure and easier to remember than what are traditionally considered strong passwords (e.g., m?6t2E#A). The main source of their strength is that they’re much longer than… [more]

Don’t Force Links to Open in New Windows

by Ian Dunn

Sven LennartzĀ has a good post at Smashing Magazine detailing why links shouldn’t be targeted to open in new windows . This is a big pet peeve of mine because it takes control away from the user. Insecure site owners force it on their users, thinking it will keep people on the site longer, but the correct way to build traffic isn’t to make leaving… [more]

Uploading Files with Custom Post Types

by Ian Dunn

If you’re building a custom post type and want to let the user upload files, you’ll need to add enctype=”multipart/form-data” to the form tag, using theĀ  post_edit_form_tag filter. Otherwise the $_FILES array will be empty.

Creating Custom Post Types With Extra Fields

by Ian Dunn

Richard Shepherd’s post on creating custom post types in WordPress is the first good example I’ve found that covers adding extra data fields.

Why RSS is Important

by Ian Dunn

Kroc Camen makes a good argument for why RSS is important and points out how web browsers can better support it.

Add this ribbon to your WordPress website re-abolish slavery