Added check for match between wp option and plugin version number
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 14 Jan 2016 20:20:54 +0000 (15:20 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 14 Jan 2016 20:20:54 +0000 (15:20 -0500)
glm-member-db.php

index 77a5b0d..4d6aaca 100644 (file)
  *  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');