Version Description
Download this release
Release Info
Developer | unbouncewordpress |
Plugin | Unbounce Landing Pages |
Version | 1.0.20 |
Comparing to | |
See all releases |
Code changes from version 1.0.19 to 1.0.20
- UBCompatibility.php +0 -18
- UBConfig.php +2 -2
- UBDiagnostics.php +1 -1
- UBHTTP.php +2 -15
- Unbounce-Page.php +3 -4
- readme.txt +1 -1
- templates/main_authorized_footer.php +1 -1
- templates/main_unauthorized_footer.php +1 -1
UBCompatibility.php
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
// taken from: http://php.net/manual/en/function.http-response-code.php
|
4 |
// For 4.3.0 <= PHP <= 5.4.0
|
5 |
if (!function_exists('http_response_code')) {
|
6 |
function http_response_code($code = NULL) {
|
@@ -67,21 +66,4 @@ if (!function_exists('http_response_code')) {
|
|
67 |
}
|
68 |
}
|
69 |
|
70 |
-
// taken from: http://php.net/manual/en/function.getallheaders.php
|
71 |
-
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 |
?>
|
1 |
<?php
|
2 |
|
|
|
3 |
// For 4.3.0 <= PHP <= 5.4.0
|
4 |
if (!function_exists('http_response_code')) {
|
5 |
function http_response_code($code = NULL) {
|
66 |
}
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
?>
|
UBConfig.php
CHANGED
@@ -4,8 +4,8 @@ class UBConfig {
|
|
4 |
|
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.
|
8 |
-
const UB_VERSION = '1.0.
|
9 |
|
10 |
# Option keys
|
11 |
const UB_ROUTES_CACHE_KEY = 'ub-route-cache';
|
4 |
|
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.20';
|
8 |
+
const UB_VERSION = '1.0.20';
|
9 |
|
10 |
# Option keys
|
11 |
const UB_ROUTES_CACHE_KEY = 'ub-route-cache';
|
UBDiagnostics.php
CHANGED
@@ -28,7 +28,7 @@ class UBDiagnostics {
|
|
28 |
return array(
|
29 |
'PHP Version' => phpversion(),
|
30 |
'WordPress Version' => UBDiagnostics::wordpress_version(),
|
31 |
-
'Unbounce Plugin Version' => "1.0.
|
32 |
'Permalink Structure' => get_option('permalink_structure', ''),
|
33 |
'Domain' => $domain,
|
34 |
'Domain Authorized' => print_r(UBConfig::is_authorized_domain($domain), true),
|
28 |
return array(
|
29 |
'PHP Version' => phpversion(),
|
30 |
'WordPress Version' => UBDiagnostics::wordpress_version(),
|
31 |
+
'Unbounce Plugin Version' => "1.0.20",
|
32 |
'Permalink Structure' => get_option('permalink_structure', ''),
|
33 |
'Domain' => $domain,
|
34 |
'Domain Authorized' => print_r(UBConfig::is_authorized_domain($domain), true),
|
UBHTTP.php
CHANGED
@@ -7,7 +7,7 @@ class UBHTTP {
|
|
7 |
public static $variant_url_regex = '/(.+)\/[a-z]+\.html/i';
|
8 |
public static $pie_htc_url = '/PIE.htc';
|
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:|
|
11 |
|
12 |
public static function is_private_ip_address($ip_address) {
|
13 |
return !filter_var($ip_address,
|
@@ -126,17 +126,6 @@ class UBHTTP {
|
|
126 |
return $protocol === 'http' || $protocol === 'https';
|
127 |
}
|
128 |
|
129 |
-
// taken from: http://stackoverflow.com/a/13036310/322727
|
130 |
-
private static function convert_headers_to_curl($headers) {
|
131 |
-
// map to curl-friendly format
|
132 |
-
$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 |
public static function stream_request($method,
|
141 |
$target_url,
|
142 |
$cookie_string,
|
@@ -147,9 +136,7 @@ class UBHTTP {
|
|
147 |
$forwarded_for = UBUtil::array_fetch($_SERVER, 'HTTP_X_FORWARDED_FOR');
|
148 |
$remote_ip = UBUtil::array_fetch($_SERVER, 'REMOTE_ADDR');
|
149 |
|
150 |
-
$
|
151 |
-
|
152 |
-
$headers = UBHTTP::get_proxied_for_header($curl_headers,
|
153 |
$forwarded_for,
|
154 |
$remote_ip);
|
155 |
|
7 |
public static $variant_url_regex = '/(.+)\/[a-z]+\.html/i';
|
8 |
public static $pie_htc_url = '/PIE.htc';
|
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:|Location:|Link:|Content-Location:|Set-Cookie:|X-Server-Instance:|X-Unbounce-PageId:|X-Unbounce-Variant:|X-Unbounce-VisitorID:)/i';
|
11 |
|
12 |
public static function is_private_ip_address($ip_address) {
|
13 |
return !filter_var($ip_address,
|
126 |
return $protocol === 'http' || $protocol === 'https';
|
127 |
}
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
public static function stream_request($method,
|
130 |
$target_url,
|
131 |
$cookie_string,
|
136 |
$forwarded_for = UBUtil::array_fetch($_SERVER, 'HTTP_X_FORWARDED_FOR');
|
137 |
$remote_ip = UBUtil::array_fetch($_SERVER, 'REMOTE_ADDR');
|
138 |
|
139 |
+
$headers = UBHTTP::get_proxied_for_header($headers0,
|
|
|
|
|
140 |
$forwarded_for,
|
141 |
$remote_ip);
|
142 |
|
Unbounce-Page.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Unbounce Landing Pages
|
4 |
Plugin URI: http://unbounce.com
|
5 |
Description: Unbounce is the most powerful standalone landing page builder available.
|
6 |
-
Version: 1.0.
|
7 |
Author: Unbounce
|
8 |
Author URI: http://unbounce.com
|
9 |
License: GPLv2
|
@@ -134,8 +134,7 @@ add_action('init', function() {
|
|
134 |
|
135 |
$cookie_string = UBHTTP::cookie_string_from_array($cookies_to_forward);
|
136 |
|
137 |
-
$
|
138 |
-
$all_headers['Host'] = $domain;
|
139 |
|
140 |
// Make sure we don't get cached by Wordpress hosts like WPEngine
|
141 |
header('Cache-Control: max-age=0; private');
|
@@ -143,7 +142,7 @@ add_action('init', function() {
|
|
143 |
list($success, $message) = UBHTTP::stream_request($http_method,
|
144 |
$raw_url,
|
145 |
$cookie_string,
|
146 |
-
$
|
147 |
$user_agent);
|
148 |
|
149 |
if($success === false) {
|
3 |
Plugin Name: Unbounce Landing Pages
|
4 |
Plugin URI: http://unbounce.com
|
5 |
Description: Unbounce is the most powerful standalone landing page builder available.
|
6 |
+
Version: 1.0.20
|
7 |
Author: Unbounce
|
8 |
Author URI: http://unbounce.com
|
9 |
License: GPLv2
|
134 |
|
135 |
$cookie_string = UBHTTP::cookie_string_from_array($cookies_to_forward);
|
136 |
|
137 |
+
$req_headers = $referer == null ? array('Host: ' . $domain) : array('Referer: ' . $referer, 'Host: ' . $domain);
|
|
|
138 |
|
139 |
// Make sure we don't get cached by Wordpress hosts like WPEngine
|
140 |
header('Cache-Control: max-age=0; private');
|
142 |
list($success, $message) = UBHTTP::stream_request($http_method,
|
143 |
$raw_url,
|
144 |
$cookie_string,
|
145 |
+
$req_headers,
|
146 |
$user_agent);
|
147 |
|
148 |
if($success === false) {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: unbouncewordpress
|
|
3 |
Tags: Unbounce, AB testing, A/B testing, split testing, CRO, conversion optimization, wordpress landing page, wp landing pages, splash pages, landing pages, squeeze pages, lead gen, lead generation, email list, responsive landing pages, templates, inbound marketing, ppc, analytics
|
4 |
Requires at least: 4.1.5
|
5 |
Tested up to: 4.4
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
3 |
Tags: Unbounce, AB testing, A/B testing, split testing, CRO, conversion optimization, wordpress landing page, wp landing pages, splash pages, landing pages, squeeze pages, lead gen, lead generation, email list, responsive landing pages, templates, inbound marketing, ppc, analytics
|
4 |
Requires at least: 4.1.5
|
5 |
Tested up to: 4.4
|
6 |
+
Stable tag: 1.0.20
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
templates/main_authorized_footer.php
CHANGED
@@ -17,4 +17,4 @@ $refresh_button = get_submit_button('refreshing the Published Pages list', 'seco
|
|
17 |
Check out our knowledge base.
|
18 |
</a>
|
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.
|
17 |
Check out our knowledge base.
|
18 |
</a>
|
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.20</p>
|
templates/main_unauthorized_footer.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
<a class="ub-diagnostics-link" href="<?php echo admin_url('admin.php?page=unbounce-pages-diagnostics'); ?>">
|
5 |
Click here for troubleshooting and plugin diagnostics
|
6 |
</a>
|
7 |
-
<p class="ub-version">Unbounce Version 1.0.
|
4 |
<a class="ub-diagnostics-link" href="<?php echo admin_url('admin.php?page=unbounce-pages-diagnostics'); ?>">
|
5 |
Click here for troubleshooting and plugin diagnostics
|
6 |
</a>
|
7 |
+
<p class="ub-version">Unbounce Version 1.0.20</p>
|