From: Chuck Scott Date: Wed, 8 Mar 2017 21:38:22 +0000 (-0500) Subject: Contiuing work on Update Server support X-Git-Tag: v2.9.11~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=0575a480d45d27f3502e077a0a94438a8fdcbce2;p=WP-Plugins%2Fglm-member-db.git Contiuing work on Update Server support --- diff --git a/defines.php b/defines.php index e6315291..93e27b39 100644 --- a/defines.php +++ b/defines.php @@ -87,3 +87,10 @@ define('GLM_MEMBERS_PLUGIN_ACTIVE_DB_OPTION', 'glmMembersDatabaseDbVersion'); $glmCurrentTheme = wp_get_theme(); define('GLM_MEMBERS_PLUGIN_CURRENT_THEME', $glmCurrentTheme->get_template()); define('GLM_MEMBERS_PLUGIN_CURRENT_THEME_DIR', $glmCurrentTheme->get_template_directory()); + +// Update Server +if (GLM_MEMBER_PLUGIN_HOST == 'CHUCK') { + define('GLM_MEMBERS_PLUGIN_UPDATE_SERVER', 'http://192.168.44.54/update_server'); +} else { + define('GLM_MEMBERS_PLUGIN_UPDATE_SERVER', 'http://www.gaslightmedia.com/update_server'); +} diff --git a/index.php b/index.php index b31f7ca1..9d811417 100644 --- a/index.php +++ b/index.php @@ -342,22 +342,6 @@ if (glmCheckDatabase('install')) { } } - /* - * 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_PLUGIN_LIB_PATH.'/opentools-update-checker/opentools-update-checker.php'; - ${GLM_MEMBERS_PLUGIN_PREFIX."updateChecker"} = new OpenToolsPluginUpdateChecker( - 'http://www.gaslightmedia.com/update_server/?action=get_metadata&slug='.GLM_MEMBERS_PLUGIN_SLUG, - __FILE__, - GLM_MEMBERS_PLUGIN_SLUG - ); - - ${GLM_MEMBERS_PLUGIN_PREFIX."updateChecker"}->declareCredentials(array( - 'license_key' => __('License Key:') - )); - */ - /* * * Activate and Deactivate hooks @@ -726,5 +710,18 @@ function glmCheckDatabase () } // For each plugin return $all_db_setup_status; + } +/* + * Plugin Update Support - uses Gaslight Media update server + */ +require GLM_MEMBERS_PLUGIN_LIB_PATH.'/opentools-update-checker/opentools-update-checker.php'; +${GLM_MEMBERS_PLUGIN_PREFIX."updateChecker"} = new OpenToolsPluginUpdateChecker( + GLM_MEMBERS_PLUGIN_UPDATE_SERVER.'/?action=get_metadata&slug='.GLM_MEMBERS_PLUGIN_SLUG, + __FILE__, + GLM_MEMBERS_PLUGIN_SLUG +); +${GLM_MEMBERS_PLUGIN_PREFIX."updateChecker"}->declareCredentials(array( + 'license_key' => __('License Key:') +));