From 5e3c28c8b19be1a48158a61276c8f8d86d064be3 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 14 Jan 2016 15:20:54 -0500 Subject: [PATCH] Added check for match between wp option and plugin version number --- glm-member-db.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/glm-member-db.php b/glm-member-db.php index 77a5b0d1..4d6aacaa 100644 --- a/glm-member-db.php +++ b/glm-member-db.php @@ -34,11 +34,21 @@ * determines which version is installed for a new activation * and which update scrips are run to bring the database up to * the current 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_PLUGIN_VERSION', '1.0.57'); define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.0.43'); +// Check if plugin version is not current in WordPress option and if needed updated it +if (GLM_MEMBERS_PLUGIN_VERSION != get_option('glmMembersDatabasePluginVersion')) { + update_option('glmMembersDatabasePluginVersion', GLM_MEMBERS_PLUGIN_VERSION); +} + /* * Copyright 2014 Charles Scott (email : cscott@gaslightmedia.com) * @@ -200,11 +210,6 @@ $startupNotices = ''; // Get standard defined parameters require_once('defines.php'); -// Check if plugin version is not current in WordPress option and if needed updated it -if (GLM_MEMBERS_PLUGIN_VERSION != get_option('glmMembersDatabasePluginVersion')) { - update_option('glmMembersDatabasePluginVersion', GLM_MEMBERS_PLUGIN_VERSION); -} - // Get configuration require_once('config.php'); -- 2.17.1