1000+ Downloads of DX Plugin Base

Almost 2 years ago I built the DX Plugin Base plugin as a skeleton for my own plugins - to copy-paste snippets that I regularly use like: adding custom post types, metaboxes, implementing the Settings API and so forth. Few days ago it hit the 1000 downloads mark and I'm pretty happy that other people find that useful. Recently I saw a plugin published on WordPress.org by another author (I kinda inherited that since the author left my contributor name in the readme too) completely built on the top of the Plugin Base. As a reminder, I welcome all contributions as… Continue Reading

Settings API in 9 Steps

I'm going to update my DX Plugin Base script soon with sample code, but Settings API are something that needs a few lines of text too. There are several good resources for that, such as: http://codex.wordpress.org/Settings_API http://ottodestruct.com/blog/2009/wordpress-settings-api-tutorial/ http://wp.tutsplus.com/tutorials/the-complete-guide-to-the-wordpress-settings-api-part-2-sections-fields-and-settings/ (awesome btw) But for the very quick overview of what to be done, that's needed: hook to admin_init with a function registering settings call register_setting to reserve a slot in the DB where the setting is to be stored (setting name for DB, how is it stored in DB) call add_setting_section to create a section for settings (setting name, setting title, callback func,… Continue Reading

Plugin Base Skeleton

I got tired working on plugins and writing the same code snippets all over again, looking in the same old tutorial sites or my favorite WP 3 Plugin Dev book. So I released a startup script for plugins - http://wordpress.org/extend/plugins/dx-plugin-base/ . It contains most of the important snippets required for every plugin - registration of custom post types or taxonomies, registering activation and deactivation hooks, admin pages, metaboxes. I'm going to add widget/shortcode registration with some samples. This would make it easier to use it as a new plugin startup script and save some time about it. I also brainstorm on the… Continue Reading