DX Plugin Base v1.3 with AJAX

Earlier today I pushed an update to my skeleton plugin builder – DX Plugin Base. The plugin is meant to be used as a base for creating new plugins, you can either copy-paste it and just delete and replace what needs to be changed (that’s what the author of the Metwit Weather Widget did) or just use specific functions to create post types, meta boxes or anything like that in new plugins without having to browse again in Codex or old projects for “how exactly did I write that the last time”.

The new enhancements in version 1.3 are AJAX related. There are 2 sample use cases for AJAX calls:

  1. storing a value in the MySQL database without reloading the entire page, AJAX only
  2. fetching a URL with the HTTP API and displaying the resource title – again with AJAX, no reloading of the current page or so

As always, I’m looking for other reusable and common patterns to add to the plugin base. I’m using it occasionally when building new plugins to prevent the repetitive lookup in old projects or trying to code something from scratch and missing some essential details (like for the Settings API). All suggestions for what could be added are welcome.

Leave a Reply

Your email address will not be published. Required fields are marked *