From 198a685f8161e74f2af9faed8e74ac4fa1417e5c Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 14 Jan 2016 15:22:01 -0500 Subject: [PATCH] Added check that wp option matches current plugin version number --- glm-member-db-packaging.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/glm-member-db-packaging.php b/glm-member-db-packaging.php index 2407f6d..6547cba 100644 --- a/glm-member-db-packaging.php +++ b/glm-member-db-packaging.php @@ -32,6 +32,10 @@ * 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_PACKAGING_PLUGIN_VERSION', '1.0.19'); define('GLM_MEMBERS_PACKAGING_PLUGIN_DB_VERSION', '1.1.0'); @@ -39,6 +43,11 @@ define('GLM_MEMBERS_PACKAGING_PLUGIN_DB_VERSION', '1.1.0'); // This is the minimum version of the GLM Members DB plugin require for this plugin. define('GLM_MEMBERS_PACKAGING_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.57'); +// Check if plugin version is not current in WordPress option and if needed updated it +if (GLM_MEMBERS_PACKAGING_PLUGIN_VERSION != get_option('glmMembersDatabasePackagingPluginVersion')) { + update_option('glmMembersDatabasePackagingPluginVersion', GLM_MEMBERS_PACKAGING_PLUGIN_VERSION); +} + /* * Copyright 2014 Charles Scott (email : cscott@gaslightmedia.com) * -- 2.17.1