Unbounce Landing Pages - Version 1.0.22

Version Description

  • Add global UB_ENABLE_LOCAL_LOGGING to enable/disable debug logging of Unbounce Plugin
Download this release

Release Info

Developer unbouncewordpress
Plugin Icon Unbounce Landing Pages
Version 1.0.22
Comparing to
See all releases

Code changes from version 1.0.21 to 1.0.22

UBConfig.php CHANGED
@@ -4,10 +4,10 @@ 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.21';
8
- const UB_VERSION = '1.0.21';
9
 
10
- # Option keys
11
  const UB_ROUTES_CACHE_KEY = 'ub-route-cache';
12
  const UB_REMOTE_DEBUG_KEY = 'ub-remote-debug';
13
  const UB_PAGE_SERVER_DOMAIN_KEY = 'ub-page-server-domain';
@@ -25,8 +25,8 @@ class UBConfig {
25
  const UB_LOCK_NAME = 'ub-sql-lock';
26
 
27
  public static function ub_option_keys() {
28
- # All options, used by UBDiagnostics and deactivation hook
29
- # Arrays are not allowed in class constants, so use a function
30
  return array(
31
  UBConfig::UB_ROUTES_CACHE_KEY,
32
  UBConfig::UB_REMOTE_DEBUG_KEY,
@@ -109,7 +109,7 @@ class UBConfig {
109
  }
110
 
111
  public static function debug_loggging_enabled() {
112
- return WP_DEBUG || WP_DEBUG_LOG || UBConfig::remote_debug_logging_enabled();
113
  }
114
 
115
  public static function remote_debug_logging_enabled() {
@@ -264,11 +264,11 @@ class UBConfig {
264
  return array(true, $urls);
265
  }
266
  else {
267
- # libXMLError has no default tostring, use print_r to get a string representation of it
268
  $errors = array_map(function($error) {
269
  return print_r($error, true);
270
  }, libxml_get_errors());
271
- # Return what we tried to parse for debugging
272
  $errors[] = "XML content: ${string}";
273
  libxml_use_internal_errors($use_internal_errors);
274
  return array(false, $errors);
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.22';
8
+ const UB_VERSION = '1.0.22';
9
 
10
+ // Option keys
11
  const UB_ROUTES_CACHE_KEY = 'ub-route-cache';
12
  const UB_REMOTE_DEBUG_KEY = 'ub-remote-debug';
13
  const UB_PAGE_SERVER_DOMAIN_KEY = 'ub-page-server-domain';
25
  const UB_LOCK_NAME = 'ub-sql-lock';
26
 
27
  public static function ub_option_keys() {
28
+ // All options, used by UBDiagnostics and deactivation hook
29
+ // Arrays are not allowed in class constants, so use a function
30
  return array(
31
  UBConfig::UB_ROUTES_CACHE_KEY,
32
  UBConfig::UB_REMOTE_DEBUG_KEY,
109
  }
110
 
111
  public static function debug_loggging_enabled() {
112
+ return (defined('UB_ENABLE_LOCAL_LOGGING') && UB_ENABLE_LOCAL_LOGGING) || self::remote_debug_logging_enabled();
113
  }
114
 
115
  public static function remote_debug_logging_enabled() {
264
  return array(true, $urls);
265
  }
266
  else {
267
+ // libXMLError has no default tostring, use print_r to get a string representation of it
268
  $errors = array_map(function($error) {
269
  return print_r($error, true);
270
  }, libxml_get_errors());
271
+ // Return what we tried to parse for debugging
272
  $errors[] = "XML content: ${string}";
273
  libxml_use_internal_errors($use_internal_errors);
274
  return array(false, $errors);
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.21",
32
  'Permalink Structure' => get_option('permalink_structure', ''),
33
  'Domain' => $domain,
34
  'Domain Authorized' => print_r(UBConfig::is_authorized_domain($domain), true),
@@ -49,9 +49,9 @@ class UBDiagnostics {
49
  return get_option($key);
50
  }, UBConfig::ub_option_keys());
51
 
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
  }
57
 
28
  return array(
29
  'PHP Version' => phpversion(),
30
  'WordPress Version' => UBDiagnostics::wordpress_version(),
31
+ 'Unbounce Plugin Version' => '1.0.22',
32
  'Permalink Structure' => get_option('permalink_structure', ''),
33
  'Domain' => $domain,
34
  'Domain Authorized' => print_r(UBConfig::is_authorized_domain($domain), true),
49
  return get_option($key);
50
  }, UBConfig::ub_option_keys());
51
 
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
  }
57
 
UBLogger.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
 
3
- require_once dirname(__FILE__) . '/UBConfig.php';
4
- require_once dirname(__FILE__) . '/UBEvents.php';
5
-
6
  class UBLogger {
7
 
8
  // should be called when the plugin is loaded
1
  <?php
2
 
 
 
 
3
  class UBLogger {
4
 
5
  // should be called when the plugin is loaded
UBPageTable.php CHANGED
@@ -1,8 +1,6 @@
1
  <?php
2
 
3
- require_once dirname(__FILE__) . '/UBWPListTable.php';
4
-
5
- class UBPageTable extends UB_WP_List_Table {
6
 
7
  private $item_scroll_threshold = 10;
8
 
1
  <?php
2
 
3
+ class UBPageTable extends UBWPListTable {
 
 
4
 
5
  private $item_scroll_threshold = 10;
6
 
UBWPListTable.php CHANGED
@@ -8,7 +8,7 @@
8
  * @package WordPress
9
  * @subpackage List_Table
10
  */
11
- class UB_WP_List_Table {
12
 
13
  /**
14
  * The current list of items
8
  * @package WordPress
9
  * @subpackage List_Table
10
  */
11
+ class UBWPListTable {
12
 
13
  /**
14
  * The current list of items
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.21
7
  Author: Unbounce
8
  Author URI: http://unbounce.com
9
  License: GPLv2
@@ -16,6 +16,7 @@ require_once dirname(__FILE__) . '/UBConfig.php';
16
  require_once dirname(__FILE__) . '/UBLogger.php';
17
  require_once dirname(__FILE__) . '/UBHTTP.php';
18
  require_once dirname(__FILE__) . '/UBIcon.php';
 
19
  require_once dirname(__FILE__) . '/UBPageTable.php';
20
  require_once dirname(__FILE__) . '/UBEvents.php';
21
  require_once dirname(__FILE__) . '/UBTemplate.php';
@@ -163,14 +164,14 @@ add_action('init', function() {
163
  add_action('admin_init', function() {
164
  UBUtil::clear_flash();
165
 
166
- # Disable incompatible scripts
167
 
168
- # WPML
169
  wp_dequeue_script('installer-admin');
170
 
171
- # Enqueue our own scripts
172
 
173
- # Main page
174
  wp_enqueue_script('ub-rx',
175
  plugins_url('js/rx.lite.compat.min.js', __FILE__));
176
  wp_enqueue_script('set-unbounce-domains-js',
@@ -180,15 +181,15 @@ add_action('admin_init', function() {
180
  plugins_url('js/unbounce-page.js', __FILE__),
181
  array('jquery'));
182
 
183
- # Diagnostics page
184
  wp_enqueue_script('ub-clipboard-js',
185
  plugins_url('js/clipboard.min.js', __FILE__));
186
  wp_enqueue_script('unbounce-diagnostics-js',
187
  plugins_url('js/unbounce-diagnostics.js', __FILE__),
188
  array('jquery', 'ub-clipboard-js'));
189
- # Re-enable incompatible scripts
190
 
191
- # WPML
192
  wp_enqueue_script('installer-admin');
193
 
194
  wp_enqueue_style('unbounce-pages-css',
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.22
7
  Author: Unbounce
8
  Author URI: http://unbounce.com
9
  License: GPLv2
16
  require_once dirname(__FILE__) . '/UBLogger.php';
17
  require_once dirname(__FILE__) . '/UBHTTP.php';
18
  require_once dirname(__FILE__) . '/UBIcon.php';
19
+ require_once dirname(__FILE__).'/UBWPListTable.php';
20
  require_once dirname(__FILE__) . '/UBPageTable.php';
21
  require_once dirname(__FILE__) . '/UBEvents.php';
22
  require_once dirname(__FILE__) . '/UBTemplate.php';
164
  add_action('admin_init', function() {
165
  UBUtil::clear_flash();
166
 
167
+ // Disable incompatible scripts
168
 
169
+ // WPML
170
  wp_dequeue_script('installer-admin');
171
 
172
+ // Enqueue our own scripts
173
 
174
+ // Main page
175
  wp_enqueue_script('ub-rx',
176
  plugins_url('js/rx.lite.compat.min.js', __FILE__));
177
  wp_enqueue_script('set-unbounce-domains-js',
181
  plugins_url('js/unbounce-page.js', __FILE__),
182
  array('jquery'));
183
 
184
+ // Diagnostics page
185
  wp_enqueue_script('ub-clipboard-js',
186
  plugins_url('js/clipboard.min.js', __FILE__));
187
  wp_enqueue_script('unbounce-diagnostics-js',
188
  plugins_url('js/unbounce-diagnostics.js', __FILE__),
189
  array('jquery', 'ub-clipboard-js'));
190
+ // Re-enable incompatible scripts
191
 
192
+ // WPML
193
  wp_enqueue_script('installer-admin');
194
 
195
  wp_enqueue_style('unbounce-pages-css',
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.21
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -89,8 +89,23 @@ to help track down the issue.
89
 
90
  == Changelog ==
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  = 1.0.17 =
93
- * Support Multisite installations
94
 
95
  = 1.0.16 =
96
  * Update compatibility information and changelog
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.22
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
89
 
90
  == Changelog ==
91
 
92
+ = 1.0.22 =
93
+ * Add global UB_ENABLE_LOCAL_LOGGING to enable/disable debug logging of Unbounce Plugin
94
+
95
+ = 1.0.21 =
96
+ * Fixes some multi-site compatibility issues
97
+
98
+ = 1.0.20 =
99
+ * Revert changes in 1.0.19
100
+
101
+ = 1.0.19 =
102
+ * Minor bug fix
103
+
104
+ = 1.0.18 =
105
+ * Minor bug fix
106
+
107
  = 1.0.17 =
108
+ * Fixes some multi-site compatibility issues
109
 
110
  = 1.0.16 =
111
  * Update compatibility information and changelog
templates/authorize_button.php CHANGED
@@ -3,18 +3,22 @@
3
  <input type="hidden" name="user_id" />
4
  <input type="hidden" name="domain_id" />
5
  <input type="hidden" name="client_id" />
6
- <?php if(isset($outer_text)) { ?>
7
  <?php echo $outer_text; ?>
8
  <?php } ?>
9
  <?php $style = isset($outer_text) ? 'vertical-align: baseline' : ''; ?>
10
- <?php echo get_submit_button($text,
 
 
11
  $is_primary ? 'primary' : 'secondary',
12
  'set-unbounce-domains',
13
  $wrap_in_p,
14
- array('data-set-domains-url' => admin_url('admin-post.php?action=set_unbounce_domains'),
 
15
  'data-redirect-uri' => admin_url('admin.php?page=unbounce-pages'),
16
  'data-api-url' => UBConfig::api_url(),
17
  'data-api-client-id' => UBConfig::api_client_id(),
18
  'data-wordpress-domain-name' => $domain,
19
- 'style' => $style)); ?>
 
20
  </form>
3
  <input type="hidden" name="user_id" />
4
  <input type="hidden" name="domain_id" />
5
  <input type="hidden" name="client_id" />
6
+ <?php if (isset($outer_text)) { ?>
7
  <?php echo $outer_text; ?>
8
  <?php } ?>
9
  <?php $style = isset($outer_text) ? 'vertical-align: baseline' : ''; ?>
10
+ <?php
11
+
12
+ echo get_submit_button($text,
13
  $is_primary ? 'primary' : 'secondary',
14
  'set-unbounce-domains',
15
  $wrap_in_p,
16
+ array(
17
+ 'data-set-domains-url' => admin_url('admin-post.php?action=set_unbounce_domains'),
18
  'data-redirect-uri' => admin_url('admin.php?page=unbounce-pages'),
19
  'data-api-url' => UBConfig::api_url(),
20
  'data-api-client-id' => UBConfig::api_client_id(),
21
  'data-wordpress-domain-name' => $domain,
22
+ 'style' => $style,
23
+ )); ?>
24
  </form>
templates/diagnostics.php CHANGED
@@ -4,13 +4,15 @@
4
  <a href="<?php echo admin_url('admin.php?page=unbounce-pages'); ?>">Main Plugin Page</a>
5
  <br/>
6
  <ul class="ub-diagnostics-checks">
7
- <?php foreach($checks as $check => $success) { ?>
8
  <?php $css_class = ($success ? 'dashicons-yes' : 'dashicons-no-alt'); ?>
9
  <li>
10
  <span class='dashicons <?php echo $css_class; ?>'></span>
11
  <?php echo $check; ?>
12
- <?php if(!$success) { ?>
13
- <?php switch($check) {
 
 
14
  case 'Curl Support': ?>
15
  <p class="ub-diagnostics-check-description">
16
  Curl is not currently enabled, please contact your hosting provider or IT professional to enable Curl support.
@@ -41,7 +43,7 @@
41
  contact your hosting provider or IT professional to ensure Curl
42
  Supported is installed and enabled.
43
  </p>
44
- <?php if($curl_error_message) { ?>
45
  <p class="ub-diagnostics-check-description"><?php echo $curl_error_message; ?></p>
46
  <?php } ?>
47
  <?php break; ?>
@@ -73,12 +75,14 @@
73
  please also provide details on your hosting provider.
74
  </p>
75
  <textarea id="ub-diagnostics-text" rows="10" cols="100">
76
- <?php foreach($details as $detail_name => $detail) { ?>
77
  <?php echo "[${detail_name}] ${detail}\n"; ?>
78
  <?php } ?>
79
  </textarea>
80
  <div id="ub-diagnostics-copy-result"></div>
81
- <?php echo get_submit_button('Copy to Clipboard',
 
 
82
  'primary',
83
  'ub-diagnostics-copy',
84
  false,
4
  <a href="<?php echo admin_url('admin.php?page=unbounce-pages'); ?>">Main Plugin Page</a>
5
  <br/>
6
  <ul class="ub-diagnostics-checks">
7
+ <?php foreach ($checks as $check => $success) { ?>
8
  <?php $css_class = ($success ? 'dashicons-yes' : 'dashicons-no-alt'); ?>
9
  <li>
10
  <span class='dashicons <?php echo $css_class; ?>'></span>
11
  <?php echo $check; ?>
12
+ <?php if (!$success) { ?>
13
+ <?php
14
+
15
+ switch ($check) {
16
  case 'Curl Support': ?>
17
  <p class="ub-diagnostics-check-description">
18
  Curl is not currently enabled, please contact your hosting provider or IT professional to enable Curl support.
43
  contact your hosting provider or IT professional to ensure Curl
44
  Supported is installed and enabled.
45
  </p>
46
+ <?php if ($curl_error_message) { ?>
47
  <p class="ub-diagnostics-check-description"><?php echo $curl_error_message; ?></p>
48
  <?php } ?>
49
  <?php break; ?>
75
  please also provide details on your hosting provider.
76
  </p>
77
  <textarea id="ub-diagnostics-text" rows="10" cols="100">
78
+ <?php foreach ($details as $detail_name => $detail) { ?>
79
  <?php echo "[${detail_name}] ${detail}\n"; ?>
80
  <?php } ?>
81
  </textarea>
82
  <div id="ub-diagnostics-copy-result"></div>
83
+ <?php
84
+
85
+ echo get_submit_button('Copy to Clipboard',
86
  'primary',
87
  'ub-diagnostics-copy',
88
  false,
templates/main.php CHANGED
@@ -1,25 +1,30 @@
1
  <?php
 
2
  echo '<div class="ub-plugin-wrapper>';
3
 
4
  $is_authorized = UBConfig::is_authorized_domain($domain);
5
  $diagnostics_failed = in_array(false, UBDiagnostics::checks($domain, $domain_info));
6
 
7
  echo UBTemplate::render('main_header',
8
- array('img_url' => plugins_url('img/unbounce-logo-blue.png', __FILE__),
 
9
  'is_authorized' => $is_authorized,
10
  'authorization' => UBUtil::get_flash('authorization'),
11
- 'diagnostics_failed' => $diagnostics_failed));
 
12
 
13
- if($is_authorized) {
14
  $proxyable_url_set = UBUtil::array_fetch($domain_info, 'proxyable_url_set', array());
15
  $proxyable_url_set_fetched_at = UBUtil::array_fetch($domain_info, 'proxyable_url_set_fetched_at');
16
  $last_refreshed = UBUtil::time_ago($proxyable_url_set_fetched_at);
17
  echo UBTemplate::render('main_authorized',
18
- array('domain' => $domain,
 
19
  'proxyable_url_set' => $proxyable_url_set,
20
- 'last_refreshed' => $last_refreshed));
 
21
 
22
- add_action('in_admin_footer', function() {
23
  echo UBTemplate::render('main_authorized_footer');
24
  });
25
  } else {
@@ -30,7 +35,7 @@ if($is_authorized) {
30
  echo UBTemplate::render('main_unauthorized', array('domain' => $domain));
31
  }
32
 
33
- add_action('in_admin_footer', function() {
34
  echo UBTemplate::render('main_unauthorized_footer');
35
  });
36
  }
1
  <?php
2
+
3
  echo '<div class="ub-plugin-wrapper>';
4
 
5
  $is_authorized = UBConfig::is_authorized_domain($domain);
6
  $diagnostics_failed = in_array(false, UBDiagnostics::checks($domain, $domain_info));
7
 
8
  echo UBTemplate::render('main_header',
9
+ array(
10
+ 'img_url' => plugins_url('img/unbounce-logo-blue.png', __FILE__),
11
  'is_authorized' => $is_authorized,
12
  'authorization' => UBUtil::get_flash('authorization'),
13
+ 'diagnostics_failed' => $diagnostics_failed,
14
+ ));
15
 
16
+ if ($is_authorized) {
17
  $proxyable_url_set = UBUtil::array_fetch($domain_info, 'proxyable_url_set', array());
18
  $proxyable_url_set_fetched_at = UBUtil::array_fetch($domain_info, 'proxyable_url_set_fetched_at');
19
  $last_refreshed = UBUtil::time_ago($proxyable_url_set_fetched_at);
20
  echo UBTemplate::render('main_authorized',
21
+ array(
22
+ 'domain' => $domain,
23
  'proxyable_url_set' => $proxyable_url_set,
24
+ 'last_refreshed' => $last_refreshed,
25
+ ));
26
 
27
+ add_action('in_admin_footer', function () {
28
  echo UBTemplate::render('main_authorized_footer');
29
  });
30
  } else {
35
  echo UBTemplate::render('main_unauthorized', array('domain' => $domain));
36
  }
37
 
38
+ add_action('in_admin_footer', function () {
39
  echo UBTemplate::render('main_unauthorized_footer');
40
  });
41
  }
templates/main_authorized.php CHANGED
@@ -1,7 +1,9 @@
1
  <h2 class="ub-published-pages-heading">Published Pages</h2>
2
 
3
  <form method="get" action="https://app.unbounce.com" target="_blank">
4
- <?php echo get_submit_button('Manage Pages In Unbounce',
 
 
5
  'primary',
6
  'flush-unbounce-pages',
7
  false,
@@ -14,9 +16,13 @@
14
 
15
  <p>Last refreshed <?php echo $last_refreshed; ?>.</p>
16
 
17
- <?php echo UBTemplate::render('authorize_button',
18
- array('text' => 'Update WordPress Enabled Domains',
 
 
 
19
  'domain' => $domain,
20
  'wrap_in_p' => false,
21
- 'is_primary' => false)); ?>
 
22
  </div>
1
  <h2 class="ub-published-pages-heading">Published Pages</h2>
2
 
3
  <form method="get" action="https://app.unbounce.com" target="_blank">
4
+ <?php
5
+
6
+ echo get_submit_button('Manage Pages In Unbounce',
7
  'primary',
8
  'flush-unbounce-pages',
9
  false,
16
 
17
  <p>Last refreshed <?php echo $last_refreshed; ?>.</p>
18
 
19
+ <?php
20
+
21
+ echo UBTemplate::render('authorize_button',
22
+ array(
23
+ 'text' => 'Update WordPress Enabled Domains',
24
  'domain' => $domain,
25
  'wrap_in_p' => false,
26
+ 'is_primary' => false,
27
+ )); ?>
28
  </div>
templates/main_authorized_footer.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  $flush_pages_url = admin_url('admin-post.php');
3
  $diagnostics_url = admin_url('admin.php?page=unbounce-pages-diagnostics');
4
  $refresh_button = get_submit_button('refreshing the Published Pages list', 'secondary', 'flush-unbounce-pages', false);
@@ -17,4 +18,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.21</p>
1
  <?php
2
+
3
  $flush_pages_url = admin_url('admin-post.php');
4
  $diagnostics_url = admin_url('admin.php?page=unbounce-pages-diagnostics');
5
  $refresh_button = get_submit_button('refreshing the Published Pages list', 'secondary', 'flush-unbounce-pages', false);
18
  Check out our knowledge base.
19
  </a>
20
  <br/><a class="ub-diagnostics-link" href="<?php echo $diagnostics_url ?>">Click here for troubleshooting and plugin diagnostics</a>
21
+ <p class="ub-version">Unbounce Version 1.0.22</p>
templates/main_failed_authorization.php CHANGED
@@ -4,14 +4,22 @@
4
 
5
  <form method="get" action="https://app.unbounce.com/add_wordpress_domain" target="_blank">
6
  <input type="hidden" name="domain_name" value="<?php echo $domain; ?>" />
7
- <?php get_submit_Button('Add My Domain in Unbounce', 'primary', null, true,
8
- array('id' => 'add-domain',
9
- 'onclick' => 'swap_primary_buttons("add-domain", "set-unbounce-domains");')); ?>
 
 
 
 
10
  </form>
11
 
12
- <?php echo UBTemplate::render('authorize_button',
13
- array('text' => 'Update WordPress Enabled Domains',
 
 
 
14
  'domain' => $domain,
15
  'wrap_in_p' => false,
16
  'is_primary' => false,
17
- 'outer_text' => 'After adding your domain in Unbounce, come back here and ')); ?>
 
4
 
5
  <form method="get" action="https://app.unbounce.com/add_wordpress_domain" target="_blank">
6
  <input type="hidden" name="domain_name" value="<?php echo $domain; ?>" />
7
+ <?php
8
+
9
+ get_submit_Button('Add My Domain in Unbounce', 'primary', null, true,
10
+ array(
11
+ 'id' => 'add-domain',
12
+ 'onclick' => 'swap_primary_buttons("add-domain", "set-unbounce-domains");',
13
+ )); ?>
14
  </form>
15
 
16
+ <?php
17
+
18
+ echo UBTemplate::render('authorize_button',
19
+ array(
20
+ 'text' => 'Update WordPress Enabled Domains',
21
  'domain' => $domain,
22
  'wrap_in_p' => false,
23
  'is_primary' => false,
24
+ 'outer_text' => 'After adding your domain in Unbounce, come back here and ',
25
+ )); ?>
templates/main_header.php CHANGED
@@ -1,16 +1,16 @@
1
  <img class="ub-logo src=<?php echo $img_url; ?>" />
2
  <h1 class="ub-unbounce-pages-heading">Unbounce Pages</h1>
3
 
4
- <?php if($authorization === 'success' && $is_authorized) { ?>
5
  <div class="updated"><p>Authorized with Unbounce and WordPress domain successfully enabled.</p></div>
6
- <?php } elseif($authorization === 'success') { ?>
7
  <div class="updated"><p>Successfully authorized with Unbounce.</p></div>
8
- <?php } elseif($authorization === 'failure') { ?>
9
  <div class="error"><p>Sorry, there was an error authorizing with Unbounce. Please try again.</p></div>
10
  <?php } ?>
11
 
12
  <?php // Only show error if they've never authorized, otherwise it will be shown right away ?>
13
- <?php if(UBConfig::has_authorized() && $diagnostics_failed) { ?>
14
  <div class="error">
15
  <p>
16
  We have identified a configuration issue with this Unbounce Pages Plugin and your WordPress
1
  <img class="ub-logo src=<?php echo $img_url; ?>" />
2
  <h1 class="ub-unbounce-pages-heading">Unbounce Pages</h1>
3
 
4
+ <?php if ($authorization === 'success' && $is_authorized) { ?>
5
  <div class="updated"><p>Authorized with Unbounce and WordPress domain successfully enabled.</p></div>
6
+ <?php } else if ($authorization === 'success') { ?>
7
  <div class="updated"><p>Successfully authorized with Unbounce.</p></div>
8
+ <?php } else if ($authorization === 'failure') { ?>
9
  <div class="error"><p>Sorry, there was an error authorizing with Unbounce. Please try again.</p></div>
10
  <?php } ?>
11
 
12
  <?php // Only show error if they've never authorized, otherwise it will be shown right away ?>
13
+ <?php if (UBConfig::has_authorized() && $diagnostics_failed) { ?>
14
  <div class="error">
15
  <p>
16
  We have identified a configuration issue with this Unbounce Pages Plugin and your WordPress
templates/main_unauthorized.php CHANGED
@@ -1,10 +1,14 @@
1
  <div class="ub-authorize-message">Before you can publish your pages to WordPress you will have to authorize your Unbounce account.</div>
2
 
3
- <?php echo UBTemplate::render('authorize_button',
4
- array('text' => 'Authorize With Unbounce',
 
 
 
5
  'domain' => $domain,
6
  'wrap_in_p' => true,
7
- 'is_primary' => true)) ?>
 
8
 
9
  <form method="get" action="http://unbounce.com/landing-pages-for-wordpress/" target='_blank'>
10
  <input type="hidden" name="utm_medium" value="product" />
1
  <div class="ub-authorize-message">Before you can publish your pages to WordPress you will have to authorize your Unbounce account.</div>
2
 
3
+ <?php
4
+
5
+ echo UBTemplate::render('authorize_button',
6
+ array(
7
+ 'text' => 'Authorize With Unbounce',
8
  'domain' => $domain,
9
  'wrap_in_p' => true,
10
+ 'is_primary' => true,
11
+ )) ?>
12
 
13
  <form method="get" action="http://unbounce.com/landing-pages-for-wordpress/" target='_blank'>
14
  <input type="hidden" name="utm_medium" value="product" />
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.21</p>
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.22</p>