Changeset 1266857
- Timestamp:
- 10/15/2015 08:07:13 PM (9 years ago)
- Location:
- unbounce
- Files:
-
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
unbounce/tags/1.0.7/UBConfig.php
r1266757 r1266857 3 3 class UBConfig { 4 4 5 const UB_PLUGIN_NAME = 'ub-wordpress'; 6 const UB_ROUTES_CACHE_KEY = 'ub-route-cache'; 7 const UB_REMOTE_DEBUG_KEY = 'ub-remote-debug'; 5 const UB_PLUGIN_NAME = 'ub-wordpress'; 6 const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP'; 7 const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.7'; 8 const UB_VERSION = '1.0.7'; 9 10 # Option keys 11 const UB_ROUTES_CACHE_KEY = 'ub-route-cache'; 12 const UB_REMOTE_DEBUG_KEY = 'ub-remote-debug'; 8 13 const UB_PAGE_SERVER_DOMAIN_KEY = 'ub-page-server-domain'; 9 const UB_REMOTE_LOG_URL_KEY = 'ub-remote-log-url';10 const UB_REMOTE_EVENTS_URL_KEY = 'ub-remote-events-url';11 const UB_API_URL_KEY = 'ub-api-url';12 const UB_API_CLIENT_ID_KEY = 'ub-api-client-id';14 const UB_REMOTE_LOG_URL_KEY = 'ub-remote-log-url'; 15 const UB_REMOTE_EVENTS_URL_KEY = 'ub-remote-events-url'; 16 const UB_API_URL_KEY = 'ub-api-url'; 17 const UB_API_CLIENT_ID_KEY = 'ub-api-client-id'; 13 18 const UB_AUTHORIZED_DOMAINS_KEY = 'ub-authorized-domains'; 14 const UB_HAS_AUTHORIZED_KEY = 'ub-has-authorized'; 15 const UB_USER_ID_KEY = 'ub-user-id'; 16 const UB_DOMAIN_ID_KEY = 'ub-domain-id'; 17 const UB_CLIENT_ID_KEY = 'ub-client-id'; 18 const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP'; 19 const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.5'; 20 const UB_VERSION = '1.0.5'; 19 const UB_HAS_AUTHORIZED_KEY = 'ub-has-authorized'; 20 const UB_USER_ID_KEY = 'ub-user-id'; 21 const UB_DOMAIN_ID_KEY = 'ub-domain-id'; 22 const UB_CLIENT_ID_KEY = 'ub-client-id'; 23 24 public static function ub_option_keys() { 25 # All options, used by UBDiagnostics 26 # Arrays are not allowed in class constants, so use a function 27 return array( 28 UBConfig::UB_ROUTES_CACHE_KEY, 29 UBConfig::UB_REMOTE_DEBUG_KEY, 30 UBConfig::UB_PAGE_SERVER_DOMAIN_KEY, 31 UBConfig::UB_REMOTE_LOG_URL_KEY, 32 UBConfig::UB_REMOTE_EVENTS_URL_KEY, 33 UBConfig::UB_API_URL_KEY, 34 UBConfig::UB_API_CLIENT_ID_KEY, 35 UBConfig::UB_AUTHORIZED_DOMAINS_KEY, 36 UBConfig::UB_HAS_AUTHORIZED_KEY, 37 UBConfig::UB_USER_ID_KEY, 38 UBConfig::UB_DOMAIN_ID_KEY, 39 UBConfig::UB_CLIENT_ID_KEY 40 ); 41 } 21 42 22 43 public static function default_page_server_domain() { -
unbounce/tags/1.0.7/UBDiagnostics.php
r1266757 r1266857 29 29 'PHP Version' => phpversion(), 30 30 'WordPress Version' => UBDiagnostics::wordpress_version(), 31 'Unbounce Plugin Version' => "1.0. 5",31 'Unbounce Plugin Version' => "1.0.7", 32 32 'Permalink Structure' => get_option('permalink_structure', ''), 33 33 'Domain' => $domain, … … 46 46 47 47 private static function ub_options() { 48 $ ub_options = array_filter(wp_load_alloptions(),function($key) {49 return strpos($key, 'ub-') === 0;50 }, ARRAY_FILTER_USE_KEY);48 $option_values = array_map(function($key) { 49 return get_option($key); 50 }, UBConfig::ub_option_keys()); 51 51 52 return array_map(function($value) {53 $unserialized = @unserialize($value);54 return $unserialized ? $unserialized : $value;55 }, $ub_options);52 # Return an array where the key is the option key and the value 53 # the option value: 54 # array('ub-option-key' => 'option value') 55 return array_combine(UBConfig::ub_option_keys(), $option_values); 56 56 } 57 57 -
unbounce/tags/1.0.7/Unbounce-Page.php
r1266757 r1266857 4 4 Plugin URI: http://unbounce.com 5 5 Description: Publish Unbounce Landing Pages to your Wordpress Domain. 6 Version: 1.0. 56 Version: 1.0.7 7 7 Author: Unbounce 8 8 Author URI: http://unbounce.com … … 263 263 $diagnostics_url = admin_url('admin.php?page=unbounce-pages-diagnostics'); 264 264 echo "<br/><a class='ub-diagnostics-link' href='${diagnostics_url}'>Diagnostics</a>"; 265 echo '<p class="ub-version">Unbounce Version 1.0. 5</p>';265 echo '<p class="ub-version">Unbounce Version 1.0.7</p>'; 266 266 }); 267 267 } else { … … 300 300 $diagnostics_url = admin_url('admin.php?page=unbounce-pages-diagnostics'); 301 301 echo "<br/><a class='ub-diagnostics-link' href='${diagnostics_url}'>Diagnostics</a>"; 302 echo '<p class="ub-version">Unbounce Version 1.0. 5</p>';302 echo '<p class="ub-version">Unbounce Version 1.0.7</p>'; 303 303 }); 304 304 } -
unbounce/tags/1.0.7/readme.txt
r1266757 r1266857 4 4 Requires at least: 4.1.5 5 5 Tested up to: 4.3 6 Stable tag: 1.0. 56 Stable tag: 1.0.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
unbounce/trunk/UBConfig.php
r1266757 r1266857 3 3 class UBConfig { 4 4 5 const UB_PLUGIN_NAME = 'ub-wordpress'; 6 const UB_ROUTES_CACHE_KEY = 'ub-route-cache'; 7 const UB_REMOTE_DEBUG_KEY = 'ub-remote-debug'; 5 const UB_PLUGIN_NAME = 'ub-wordpress'; 6 const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP'; 7 const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.7'; 8 const UB_VERSION = '1.0.7'; 9 10 # Option keys 11 const UB_ROUTES_CACHE_KEY = 'ub-route-cache'; 12 const UB_REMOTE_DEBUG_KEY = 'ub-remote-debug'; 8 13 const UB_PAGE_SERVER_DOMAIN_KEY = 'ub-page-server-domain'; 9 const UB_REMOTE_LOG_URL_KEY = 'ub-remote-log-url';10 const UB_REMOTE_EVENTS_URL_KEY = 'ub-remote-events-url';11 const UB_API_URL_KEY = 'ub-api-url';12 const UB_API_CLIENT_ID_KEY = 'ub-api-client-id';14 const UB_REMOTE_LOG_URL_KEY = 'ub-remote-log-url'; 15 const UB_REMOTE_EVENTS_URL_KEY = 'ub-remote-events-url'; 16 const UB_API_URL_KEY = 'ub-api-url'; 17 const UB_API_CLIENT_ID_KEY = 'ub-api-client-id'; 13 18 const UB_AUTHORIZED_DOMAINS_KEY = 'ub-authorized-domains'; 14 const UB_HAS_AUTHORIZED_KEY = 'ub-has-authorized'; 15 const UB_USER_ID_KEY = 'ub-user-id'; 16 const UB_DOMAIN_ID_KEY = 'ub-domain-id'; 17 const UB_CLIENT_ID_KEY = 'ub-client-id'; 18 const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP'; 19 const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.5'; 20 const UB_VERSION = '1.0.5'; 19 const UB_HAS_AUTHORIZED_KEY = 'ub-has-authorized'; 20 const UB_USER_ID_KEY = 'ub-user-id'; 21 const UB_DOMAIN_ID_KEY = 'ub-domain-id'; 22 const UB_CLIENT_ID_KEY = 'ub-client-id'; 23 24 public static function ub_option_keys() { 25 # All options, used by UBDiagnostics 26 # Arrays are not allowed in class constants, so use a function 27 return array( 28 UBConfig::UB_ROUTES_CACHE_KEY, 29 UBConfig::UB_REMOTE_DEBUG_KEY, 30 UBConfig::UB_PAGE_SERVER_DOMAIN_KEY, 31 UBConfig::UB_REMOTE_LOG_URL_KEY, 32 UBConfig::UB_REMOTE_EVENTS_URL_KEY, 33 UBConfig::UB_API_URL_KEY, 34 UBConfig::UB_API_CLIENT_ID_KEY, 35 UBConfig::UB_AUTHORIZED_DOMAINS_KEY, 36 UBConfig::UB_HAS_AUTHORIZED_KEY, 37 UBConfig::UB_USER_ID_KEY, 38 UBConfig::UB_DOMAIN_ID_KEY, 39 UBConfig::UB_CLIENT_ID_KEY 40 ); 41 } 21 42 22 43 public static function default_page_server_domain() { -
unbounce/trunk/UBDiagnostics.php
r1266757 r1266857 29 29 'PHP Version' => phpversion(), 30 30 'WordPress Version' => UBDiagnostics::wordpress_version(), 31 'Unbounce Plugin Version' => "1.0. 5",31 'Unbounce Plugin Version' => "1.0.7", 32 32 'Permalink Structure' => get_option('permalink_structure', ''), 33 33 'Domain' => $domain, … … 46 46 47 47 private static function ub_options() { 48 $ ub_options = array_filter(wp_load_alloptions(),function($key) {49 return strpos($key, 'ub-') === 0;50 }, ARRAY_FILTER_USE_KEY);48 $option_values = array_map(function($key) { 49 return get_option($key); 50 }, UBConfig::ub_option_keys()); 51 51 52 return array_map(function($value) {53 $unserialized = @unserialize($value);54 return $unserialized ? $unserialized : $value;55 }, $ub_options);52 # Return an array where the key is the option key and the value 53 # the option value: 54 # array('ub-option-key' => 'option value') 55 return array_combine(UBConfig::ub_option_keys(), $option_values); 56 56 } 57 57 -
unbounce/trunk/Unbounce-Page.php
r1266757 r1266857 4 4 Plugin URI: http://unbounce.com 5 5 Description: Publish Unbounce Landing Pages to your Wordpress Domain. 6 Version: 1.0. 56 Version: 1.0.7 7 7 Author: Unbounce 8 8 Author URI: http://unbounce.com … … 263 263 $diagnostics_url = admin_url('admin.php?page=unbounce-pages-diagnostics'); 264 264 echo "<br/><a class='ub-diagnostics-link' href='${diagnostics_url}'>Diagnostics</a>"; 265 echo '<p class="ub-version">Unbounce Version 1.0. 5</p>';265 echo '<p class="ub-version">Unbounce Version 1.0.7</p>'; 266 266 }); 267 267 } else { … … 300 300 $diagnostics_url = admin_url('admin.php?page=unbounce-pages-diagnostics'); 301 301 echo "<br/><a class='ub-diagnostics-link' href='${diagnostics_url}'>Diagnostics</a>"; 302 echo '<p class="ub-version">Unbounce Version 1.0. 5</p>';302 echo '<p class="ub-version">Unbounce Version 1.0.7</p>'; 303 303 }); 304 304 } -
unbounce/trunk/readme.txt
r1266757 r1266857 4 4 Requires at least: 4.1.5 5 5 Tested up to: 4.3 6 Stable tag: 1.0. 56 Stable tag: 1.0.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.