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 .
Archive for May, 2011
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]
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 .
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]
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]
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.
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.