From: Chuck Scott Date: Thu, 14 Jan 2016 20:21:31 +0000 (-0500) Subject: Added check that wp option matches plugin version number X-Git-Tag: v1.0.8~3^2~6 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=2cb8204f48c64af98db48ea19412aa5d9e0a879e;p=WP-Plugins%2Fglm-member-db-contacts.git Added check that wp option matches plugin version number --- diff --git a/glm-member-db-contacts.php b/glm-member-db-contacts.php index 0f61e43..0c2bc19 100644 --- a/glm-member-db-contacts.php +++ b/glm-member-db-contacts.php @@ -32,11 +32,20 @@ * made together with the DB_VERSION below. ONLY bump the DB * version when there's a change in the database!! Use the * version nunmber of that release for the DB version. + * + * We check the plugin version stored in the WordPress option below + * so that we're sure the other add-ons see an up to date + * version from this plugin. */ define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.0.7'); define('GLM_MEMBERS_CONTACTS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.44'); define('REQUIRED_GLM_MEMBERS_PLUGIN_MIN_DB_VERSION', '1.0.41'); +// Check if plugin version is not current in WordPress option and if needed updated it +if (GLM_MEMBERS_CONTACTS_PLUGIN_VERSION != get_option('glmMembersDatabaseContactsPluginVersion')) { + update_option('glmMembersDatabaseContactsPluginVersion', GLM_MEMBERS_CONTACTS_PLUGIN_VERSION); +} + /* * Copyright 2014 Charles Scott (email : cscott@gaslightmedia.com) *