Updated update server code
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 13 Apr 2017 21:35:11 +0000 (17:35 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 13 Apr 2017 21:35:11 +0000 (17:35 -0400)
defines.php
index.php

index 4666722..84c7f23 100644 (file)
@@ -62,3 +62,5 @@ $pluginsPath = str_replace(GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, '', GLM_MEMBER
 define('GLM_MEMBERS_REGISTRATIONS_MAIN_PLUGIN_PATH', $pluginsPath.'/glm-member-db');
 define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_LIB_PATH', GLM_MEMBERS_REGISTRATIONS_MAIN_PLUGIN_PATH.'/lib');
 
+// Update Server
+define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_UPDATE_SERVER', 'http://www.gaslightmedia.com/update_server');
\ No newline at end of file
index cd53bb8..405dcc1 100644 (file)
--- a/index.php
+++ b/index.php
@@ -187,18 +187,15 @@ add_filter('glm-member-db-register-addon','glmMembersRegistrationsRegisterAddOn'
 /*
  * Plugin Update Support - uses Gaslight Media update server
  */
-/* Not functional yet - Need to resolve JavaScript conflicts with this feature in other plugins
-require GLM_MEMBERS_REGISTRATIONS_PLUGIN_LIB_PATH.'/opentools-update-checker/opentools-update-checker.php';
+require_once GLM_MEMBERS_REGISTRATIONS_MAIN_PLUGIN_PATH.'/lib/opentools-update-checker/opentools-update-checker.php';
 ${GLM_MEMBERS_REGISTRATIONS_PLUGIN_PREFIX."updateChecker"} = new OpenToolsPluginUpdateChecker(
-     'http://www.gaslightmedia.com/update_server/?action=get_metadata&slug='.GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+    GLM_MEMBERS_REGISTRATIONS_PLUGIN_UPDATE_SERVER.'/?action=get_metadata&slug='.GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
     __FILE__,
     GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG
 );
-
 ${GLM_MEMBERS_REGISTRATIONS_PLUGIN_PREFIX."updateChecker"}->declareCredentials(array(
-  'license_key' => __('License Key:')
+    'license_key' => __('License Key:')
 ));
-*/
 
 /*
   *