Changeset 1372439
- Timestamp:
- 03/16/2016 04:24:25 PM (9 years ago)
- Location:
- unbounce
- Files:
-
- 16 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
unbounce/tags/1.0.20/UBCompatibility.php
r1370998 r1372439 1 1 <?php 2 2 3 // taken from: http://php.net/manual/en/function.http-response-code.php4 3 // For 4.3.0 <= PHP <= 5.4.0 5 4 if (!function_exists('http_response_code')) { … … 68 67 } 69 68 70 // taken from: http://php.net/manual/en/function.getallheaders.php71 if (!function_exists('getallheaders'))72 {73 function getallheaders()74 {75 $headers = '';76 foreach ($_SERVER as $name => $value)77 {78 if (substr($name, 0, 5) == 'HTTP_')79 {80 $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;81 }82 }83 return $headers;84 }85 }86 87 69 ?> -
unbounce/tags/1.0.20/UBConfig.php
r1370998 r1372439 5 5 const UB_PLUGIN_NAME = 'ub-wordpress'; 6 6 const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP'; 7 const UB_USER_AGENT = 'Unbounce WP Plugin 1.0. 19';8 const UB_VERSION = '1.0. 19';7 const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.20'; 8 const UB_VERSION = '1.0.20'; 9 9 10 10 # Option keys -
unbounce/tags/1.0.20/UBDiagnostics.php
r1370998 r1372439 29 29 'PHP Version' => phpversion(), 30 30 'WordPress Version' => UBDiagnostics::wordpress_version(), 31 'Unbounce Plugin Version' => "1.0. 19",31 'Unbounce Plugin Version' => "1.0.20", 32 32 'Permalink Structure' => get_option('permalink_structure', ''), 33 33 'Domain' => $domain, -
unbounce/tags/1.0.20/UBHTTP.php
r1370998 r1372439 8 8 public static $pie_htc_url = '/PIE.htc'; 9 9 // Suppress Etag and Last-Modified so that browser doesn't send If-None-Match and If-Modified-Since header (to bypass front-end caches) 10 public static $forward_headers = '/^(Content-Type:| Content-Encoding:|Location:|Link:|Content-Location:|Set-Cookie:|X-Server-Instance:|X-Unbounce-PageId:|X-Unbounce-Variant:|X-Unbounce-VisitorID:)/i';10 public static $forward_headers = '/^(Content-Type:|Location:|Link:|Content-Location:|Set-Cookie:|X-Server-Instance:|X-Unbounce-PageId:|X-Unbounce-Variant:|X-Unbounce-VisitorID:)/i'; 11 11 12 12 public static function is_private_ip_address($ip_address) { … … 127 127 } 128 128 129 // taken from: http://stackoverflow.com/a/13036310/322727130 private static function convert_headers_to_curl($headers) {131 // map to curl-friendly format132 $req_headers = array();133 array_walk($headers, function(&$v, $k) use (&$req_headers) {134 array_push($req_headers, $k . ": " . $v);135 });136 137 return $req_headers;138 }139 140 129 public static function stream_request($method, 141 130 $target_url, … … 148 137 $remote_ip = UBUtil::array_fetch($_SERVER, 'REMOTE_ADDR'); 149 138 150 $curl_headers = UBHTTP::convert_headers_to_curl($headers0); 151 152 $headers = UBHTTP::get_proxied_for_header($curl_headers, 139 $headers = UBHTTP::get_proxied_for_header($headers0, 153 140 $forwarded_for, 154 141 $remote_ip); -
unbounce/tags/1.0.20/Unbounce-Page.php
r1370998 r1372439 4 4 Plugin URI: http://unbounce.com 5 5 Description: Unbounce is the most powerful standalone landing page builder available. 6 Version: 1.0. 196 Version: 1.0.20 7 7 Author: Unbounce 8 8 Author URI: http://unbounce.com … … 135 135 $cookie_string = UBHTTP::cookie_string_from_array($cookies_to_forward); 136 136 137 $all_headers = getallheaders(); 138 $all_headers['Host'] = $domain; 137 $req_headers = $referer == null ? array('Host: ' . $domain) : array('Referer: ' . $referer, 'Host: ' . $domain); 139 138 140 139 // Make sure we don't get cached by Wordpress hosts like WPEngine … … 144 143 $raw_url, 145 144 $cookie_string, 146 $ all_headers,145 $req_headers, 147 146 $user_agent); 148 147 -
unbounce/tags/1.0.20/readme.txt
r1370998 r1372439 4 4 Requires at least: 4.1.5 5 5 Tested up to: 4.4 6 Stable tag: 1.0. 196 Stable tag: 1.0.20 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
unbounce/tags/1.0.20/templates/main_authorized_footer.php
r1370998 r1372439 18 18 </a> 19 19 <br/><a class="ub-diagnostics-link" href="<?php echo $diagnostics_url ?>">Click here for troubleshooting and plugin diagnostics</a> 20 <p class="ub-version">Unbounce Version 1.0. 19</p>20 <p class="ub-version">Unbounce Version 1.0.20</p> -
unbounce/tags/1.0.20/templates/main_unauthorized_footer.php
r1370998 r1372439 5 5 Click here for troubleshooting and plugin diagnostics 6 6 </a> 7 <p class="ub-version">Unbounce Version 1.0. 19</p>7 <p class="ub-version">Unbounce Version 1.0.20</p> -
unbounce/trunk/UBCompatibility.php
r1370998 r1372439 1 1 <?php 2 2 3 // taken from: http://php.net/manual/en/function.http-response-code.php4 3 // For 4.3.0 <= PHP <= 5.4.0 5 4 if (!function_exists('http_response_code')) { … … 68 67 } 69 68 70 // taken from: http://php.net/manual/en/function.getallheaders.php71 if (!function_exists('getallheaders'))72 {73 function getallheaders()74 {75 $headers = '';76 foreach ($_SERVER as $name => $value)77 {78 if (substr($name, 0, 5) == 'HTTP_')79 {80 $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;81 }82 }83 return $headers;84 }85 }86 87 69 ?> -
unbounce/trunk/UBConfig.php
r1370998 r1372439 5 5 const UB_PLUGIN_NAME = 'ub-wordpress'; 6 6 const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP'; 7 const UB_USER_AGENT = 'Unbounce WP Plugin 1.0. 19';8 const UB_VERSION = '1.0. 19';7 const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.20'; 8 const UB_VERSION = '1.0.20'; 9 9 10 10 # Option keys -
unbounce/trunk/UBDiagnostics.php
r1370998 r1372439 29 29 'PHP Version' => phpversion(), 30 30 'WordPress Version' => UBDiagnostics::wordpress_version(), 31 'Unbounce Plugin Version' => "1.0. 19",31 'Unbounce Plugin Version' => "1.0.20", 32 32 'Permalink Structure' => get_option('permalink_structure', ''), 33 33 'Domain' => $domain, -
unbounce/trunk/UBHTTP.php
r1370998 r1372439 8 8 public static $pie_htc_url = '/PIE.htc'; 9 9 // Suppress Etag and Last-Modified so that browser doesn't send If-None-Match and If-Modified-Since header (to bypass front-end caches) 10 public static $forward_headers = '/^(Content-Type:| Content-Encoding:|Location:|Link:|Content-Location:|Set-Cookie:|X-Server-Instance:|X-Unbounce-PageId:|X-Unbounce-Variant:|X-Unbounce-VisitorID:)/i';10 public static $forward_headers = '/^(Content-Type:|Location:|Link:|Content-Location:|Set-Cookie:|X-Server-Instance:|X-Unbounce-PageId:|X-Unbounce-Variant:|X-Unbounce-VisitorID:)/i'; 11 11 12 12 public static function is_private_ip_address($ip_address) { … … 127 127 } 128 128 129 // taken from: http://stackoverflow.com/a/13036310/322727130 private static function convert_headers_to_curl($headers) {131 // map to curl-friendly format132 $req_headers = array();133 array_walk($headers, function(&$v, $k) use (&$req_headers) {134 array_push($req_headers, $k . ": " . $v);135 });136 137 return $req_headers;138 }139 140 129 public static function stream_request($method, 141 130 $target_url, … … 148 137 $remote_ip = UBUtil::array_fetch($_SERVER, 'REMOTE_ADDR'); 149 138 150 $curl_headers = UBHTTP::convert_headers_to_curl($headers0); 151 152 $headers = UBHTTP::get_proxied_for_header($curl_headers, 139 $headers = UBHTTP::get_proxied_for_header($headers0, 153 140 $forwarded_for, 154 141 $remote_ip); -
unbounce/trunk/Unbounce-Page.php
r1370998 r1372439 4 4 Plugin URI: http://unbounce.com 5 5 Description: Unbounce is the most powerful standalone landing page builder available. 6 Version: 1.0. 196 Version: 1.0.20 7 7 Author: Unbounce 8 8 Author URI: http://unbounce.com … … 135 135 $cookie_string = UBHTTP::cookie_string_from_array($cookies_to_forward); 136 136 137 $all_headers = getallheaders(); 138 $all_headers['Host'] = $domain; 137 $req_headers = $referer == null ? array('Host: ' . $domain) : array('Referer: ' . $referer, 'Host: ' . $domain); 139 138 140 139 // Make sure we don't get cached by Wordpress hosts like WPEngine … … 144 143 $raw_url, 145 144 $cookie_string, 146 $ all_headers,145 $req_headers, 147 146 $user_agent); 148 147 -
unbounce/trunk/readme.txt
r1370998 r1372439 4 4 Requires at least: 4.1.5 5 5 Tested up to: 4.4 6 Stable tag: 1.0. 196 Stable tag: 1.0.20 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
unbounce/trunk/templates/main_authorized_footer.php
r1370998 r1372439 18 18 </a> 19 19 <br/><a class="ub-diagnostics-link" href="<?php echo $diagnostics_url ?>">Click here for troubleshooting and plugin diagnostics</a> 20 <p class="ub-version">Unbounce Version 1.0. 19</p>20 <p class="ub-version">Unbounce Version 1.0.20</p> -
unbounce/trunk/templates/main_unauthorized_footer.php
r1370998 r1372439 5 5 Click here for troubleshooting and plugin diagnostics 6 6 </a> 7 <p class="ub-version">Unbounce Version 1.0. 19</p>7 <p class="ub-version">Unbounce Version 1.0.20</p>
Note: See TracChangeset
for help on using the changeset viewer.