churchm.ag
Quick Tip: Define Plugin Version For Upgrades - ChurchMag
If you’re doing any kind of plugin development for WordPress, then you’re likely going to be releasing future updates to said plugin. In doing so, it’s always wise to track the version number for debugging purposes. Here’s how… [cc lang=”php”] if (!defined(‘PLUGIN_VERSION’)) { define(‘PLUGIN_VERSION’, ‘myplugin_version’); } if (!defined(‘PLUGIN_VERSION_NUM’)) { define(‘PLUGIN_VERSION_NUM’, ‘1.0’); } add_option(PLUGIN_VERSION, PLUGIN_VERSION_NUM); [/cc] Easy […]
Tom