Tag Archives: Plugin Development
WordCamp Dayton 2014 Slides
I’ll be speaking at WordCamp Dayton 2014 this Saturday about best practices for customizing WordPress plugins. If you’re attending and would like to follow along, you can check out the slides.
Reusing P2’s ajaxUrl Short-Circuits Other AJAX Requests
Preventing a Plugin from Automatically Updating
Creating Admin Notices From a WordPress Plugin
Preventing Callback Functions From Executing Multiple Times
Many actions in WordPress will fire multiple times, which can lead to performance drags and undesired/intuitiveness results. Pippin Williamson points out that you can check how many times an action has already run, and modify your code to respond accordingly.
Using Constants for a Text Domain in WordPress
Normally any kind of global values that don’t change within a program’s execution should be defined as constants, but text domains within internationalized WordPress plugins are an exception to that rule. Mark Jaquith explains why it’s important to use a string instead.
Re-Abolish Slavery Ribbon
Unit Testing WordPress Plugins
Basic Google Maps Placemarks Plugin
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
admin-ajax.php Response Fails When Called from Domain Alias
Uploading Files with Custom Post Types
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
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.
Determining WordPress Paths and URLs
Capturing WordPress Plugin Activation Errors
Overwrite Uploads Plugin
I just checked a new plugin called Overwrite Uploads into the WordPress.org repository. It gives users the option to overwrite existing files when uploading rather than WordPress’ default behavior, which is to add a 1 to the end of the filename, e.g., filename1.jpg.