Unbounce Landing Pages - Version 1.0.0

Version Description

Download this release

Release Info

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

Code changes from version 0.1.24 to 1.0.0

Files changed (5) hide show
  1. UBConfig.php +2 -2
  2. UBPageTable.php +4 -0
  3. Unbounce-Page.php +46 -20
  4. css/unbounce-pages.css +5 -1
  5. readme.txt +8 -10
UBConfig.php CHANGED
@@ -12,8 +12,8 @@ class UBConfig {
12
  const UB_AUTHORIZED_DOMAINS_KEY = 'ub-authorized-domains';
13
  const UB_HAS_AUTHORIZED_KEY = 'ub-has-authorized';
14
  const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP';
15
- const UB_USER_AGENT = 'Unbounce WP Plugin 0.1.24';
16
- const UB_VERSION = '0.1.24';
17
 
18
  public static function default_page_server_domain() {
19
  $domain = getenv('UB_PAGE_SERVER_DOMAIN');
12
  const UB_AUTHORIZED_DOMAINS_KEY = 'ub-authorized-domains';
13
  const UB_HAS_AUTHORIZED_KEY = 'ub-has-authorized';
14
  const UB_CACHE_TIMEOUT_ENV_KEY = 'UB_WP_ROUTES_CACHE_EXP';
15
+ const UB_USER_AGENT = 'Unbounce WP Plugin 1.0.0';
16
+ const UB_VERSION = '1.0.0';
17
 
18
  public static function default_page_server_domain() {
19
  $domain = getenv('UB_PAGE_SERVER_DOMAIN');
UBPageTable.php CHANGED
@@ -39,6 +39,10 @@ class UBPageTable extends UB_WP_List_Table {
39
  return $super;
40
  }
41
 
 
 
 
 
42
  }
43
 
44
  ?>
39
  return $super;
40
  }
41
 
42
+ public function no_items() {
43
+ _e( 'None of your Unbounce pages have been published to WordPress.' );
44
+ }
45
+
46
  }
47
 
48
  ?>
Unbounce-Page.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Unbounce
4
  Plugin URI: http://unbounce.com
5
  Description: Publish Unbounce Landing Pages to your Wordpress Domain.
6
- Version: 0.1.24
7
  Author: Unbounce
8
  Author URI: http://unbounce.com
9
  License: GPLv2
@@ -151,6 +151,9 @@ add_action('admin_init', function() {
151
  wp_enqueue_script('set-unbounce-domains-js',
152
  plugins_url('js/set-unbounce-domains.js', __FILE__),
153
  array('jquery', 'ub-rx'));
 
 
 
154
  # re-enable incompatible scripts
155
 
156
  # WPML
@@ -160,18 +163,21 @@ add_action('admin_init', function() {
160
  plugins_url('css/unbounce-pages.css', __FILE__));
161
  }, 0);
162
 
163
- function authorization_button($text, $wrap_in_p = false) {
164
  $set_domains_url = admin_url('admin-post.php?action=set_unbounce_domains');
165
  echo "<form method='post' action='$set_domains_url'>";
166
  echo "<input type='hidden' name='domains' />";
 
 
167
  echo get_submit_button($text,
168
- 'primary',
169
  'set-unbounce-domains',
170
  $wrap_in_p,
171
  array('data-set-domains-url' => $set_domains_url,
172
  'data-redirect-uri' => admin_url('admin.php?page=unbounce-pages'),
173
  'data-api-url' => UBConfig::api_url(),
174
- 'data-api-client-id' => UBConfig::api_client_id()));
 
175
  echo '</form>';
176
  }
177
  function render_unbounce_pages($domain_info, $domain) {
@@ -180,6 +186,15 @@ function render_unbounce_pages($domain_info, $domain) {
180
  echo "<img class=\"ub-logo\" src=\"${img_url}\" />";
181
  echo "<h1 class=\"ub-unbounce-pages-heading\">Unbounce Pages</h1>";
182
 
 
 
 
 
 
 
 
 
 
183
  if(UBConfig::is_authorized_domain($domain)) {
184
  $proxyable_url_set = UBUtil::array_fetch($domain_info, 'proxyable_url_set');
185
 
@@ -187,8 +202,8 @@ function render_unbounce_pages($domain_info, $domain) {
187
 
188
  echo '<form method="get" action="https://app.unbounce.com" target="_blank">';
189
  echo '<input type="hidden" name="action" value="flush_unbounce_pages" />';
190
- echo get_submit_button('Manage In Unbounce',
191
- 'secondary',
192
  'flush-unbounce-pages',
193
  false,
194
  array('style' => 'margin-top: 10px'));
@@ -200,7 +215,7 @@ function render_unbounce_pages($domain_info, $domain) {
200
 
201
  $proxyable_url_set_fetched_at = UBUtil::array_fetch($domain_info, 'proxyable_url_set_fetched_at');
202
  echo '<p>Last refreshed ' . UBUtil::time_ago($proxyable_url_set_fetched_at) . '.</p>';
203
- authorization_button('Re-authorize With Unbounce');
204
  echo '</p>';
205
  echo '</div>';
206
 
@@ -215,28 +230,39 @@ function render_unbounce_pages($domain_info, $domain) {
215
  echo '. If they are still not appearing, double check that your Unbounce pages are using a Wordpress domain.</p>';
216
  echo '</form>';
217
  echo '<a href="http://documentation.unbounce.com/hc/en-us/articles/205069824-Integrating-with-WordPress" target="_blank">Check out our knowledge base.</a>';
218
- echo '<p class="ub-version">Unbounce Version 0.1.24</p>';
219
  });
220
  } else {
221
  if (UBConfig::has_authorized()) {
222
  // They've attempted to authorize, but this domain isn't in the list
223
- echo '<div class="error"><p>This domain has not been authorized with Unbounce.</p></div>';
224
- authorization_button('Try Authorizing With Unbounce Again', true);
225
- echo '<h2>Still not working?</h2>';
226
- echo '<p>Double check that the domain you added in Unbounce matches the WordPress Address ';
227
- echo '(URL) in your WordPress account\'s General Settings.</p>';
 
 
 
 
 
 
228
  } else {
229
- // They haven't yet tried to authorize
 
230
  authorization_button('Authorize With Unbounce', true);
 
 
 
 
 
 
 
 
 
 
231
  }
232
  }
233
 
234
- $authorization = UBUtil::get_flash('authorization');
235
- if($authorization === 'success') {
236
- echo '<div class="updated"><p>Successfully authorized with Unbounce.</p></div>';
237
- } elseif($authorization === 'failure') {
238
- echo '<div class="error"><p>Sorry, there was an error authorizing with Unbounce. Please try again.</p></div>';
239
- }
240
  echo "</div>"; //close ub-plugin-wrapper
241
  }
242
 
3
  Plugin Name: Unbounce
4
  Plugin URI: http://unbounce.com
5
  Description: Publish Unbounce Landing Pages to your Wordpress Domain.
6
+ Version: 1.0.0
7
  Author: Unbounce
8
  Author URI: http://unbounce.com
9
  License: GPLv2
151
  wp_enqueue_script('set-unbounce-domains-js',
152
  plugins_url('js/set-unbounce-domains.js', __FILE__),
153
  array('jquery', 'ub-rx'));
154
+ wp_enqueue_script('unbounce-page-js',
155
+ plugins_url('js/unbounce-page.js', __FILE__),
156
+ array('jquery'));
157
  # re-enable incompatible scripts
158
 
159
  # WPML
163
  plugins_url('css/unbounce-pages.css', __FILE__));
164
  }, 0);
165
 
166
+ function authorization_button($text, $wrap_in_p = false, $is_primary = true, $outer_text = '') {
167
  $set_domains_url = admin_url('admin-post.php?action=set_unbounce_domains');
168
  echo "<form method='post' action='$set_domains_url'>";
169
  echo "<input type='hidden' name='domains' />";
170
+ echo $outer_text;
171
+ $style = $outer_text ? 'vertical-align: baseline' : '';
172
  echo get_submit_button($text,
173
+ $is_primary ? 'primary' : 'secondary',
174
  'set-unbounce-domains',
175
  $wrap_in_p,
176
  array('data-set-domains-url' => $set_domains_url,
177
  'data-redirect-uri' => admin_url('admin.php?page=unbounce-pages'),
178
  'data-api-url' => UBConfig::api_url(),
179
+ 'data-api-client-id' => UBConfig::api_client_id(),
180
+ 'style' => $style));
181
  echo '</form>';
182
  }
183
  function render_unbounce_pages($domain_info, $domain) {
186
  echo "<img class=\"ub-logo\" src=\"${img_url}\" />";
187
  echo "<h1 class=\"ub-unbounce-pages-heading\">Unbounce Pages</h1>";
188
 
189
+ $authorization = UBUtil::get_flash('authorization');
190
+ if($authorization === 'success' && UBConfig::is_authorized_domain($domain)) {
191
+ echo '<div class="updated"><p>Authorized with Unbounce and WordPress domain successfully enabled.</p></div>';
192
+ } elseif($authorization === 'success') {
193
+ echo '<div class="updated"><p>Successfully authorized with Unbounce.</p></div>';
194
+ } elseif($authorization === 'failure') {
195
+ echo '<div class="error"><p>Sorry, there was an error authorizing with Unbounce. Please try again.</p></div>';
196
+ }
197
+
198
  if(UBConfig::is_authorized_domain($domain)) {
199
  $proxyable_url_set = UBUtil::array_fetch($domain_info, 'proxyable_url_set');
200
 
202
 
203
  echo '<form method="get" action="https://app.unbounce.com" target="_blank">';
204
  echo '<input type="hidden" name="action" value="flush_unbounce_pages" />';
205
+ echo get_submit_button('Manage Pages In Unbounce',
206
+ 'primary',
207
  'flush-unbounce-pages',
208
  false,
209
  array('style' => 'margin-top: 10px'));
215
 
216
  $proxyable_url_set_fetched_at = UBUtil::array_fetch($domain_info, 'proxyable_url_set_fetched_at');
217
  echo '<p>Last refreshed ' . UBUtil::time_ago($proxyable_url_set_fetched_at) . '.</p>';
218
+ authorization_button('Update WordPress Enabled Domains', false, false);
219
  echo '</p>';
220
  echo '</div>';
221
 
230
  echo '. If they are still not appearing, double check that your Unbounce pages are using a Wordpress domain.</p>';
231
  echo '</form>';
232
  echo '<a href="http://documentation.unbounce.com/hc/en-us/articles/205069824-Integrating-with-WordPress" target="_blank">Check out our knowledge base.</a>';
233
+ echo '<p class="ub-version">Unbounce Version 1.0.0</p>';
234
  });
235
  } else {
236
  if (UBConfig::has_authorized()) {
237
  // They've attempted to authorize, but this domain isn't in the list
238
+ echo '<div class="error"><p>It looks like <strong>'.$domain.'</strong> has not been added as a WordPress domain in your Unbounce account.</p></div>';
239
+
240
+ $add_domain_url = "https://app.unbounce.com/add_wordpress_domain";
241
+ echo "<form method='get' action='$add_domain_url' target='_blank'>";
242
+ echo '<input type="hidden" name="domain_name" value="'.$domain.'" />';
243
+ echo get_submit_Button('Add My Domain in Unbounce', 'primary', null, true,
244
+ array('id' => 'add-domain',
245
+ 'onclick' => 'swap_primary_buttons("add-domain", "set-unbounce-domains");'));
246
+ echo '</form>';
247
+
248
+ authorization_button('Update WordPress Enabled Domains', false, false, 'After adding your domain in Unbounce, come back here and ');
249
  } else {
250
+ echo '<div class="ub-authorize-message">Before you can publish your pages to WordPress you will have to authorize your Unbounce account.</div>';
251
+
252
  authorization_button('Authorize With Unbounce', true);
253
+
254
+ $try_unbounce_url = "http://unbounce.com/landing-pages-for-wordpress/";
255
+ echo "<form method='get' action='$try_unbounce_url' target='_blank'>";
256
+ echo '<input type="hidden" name="utm_medium" value="product" />';
257
+ echo '<input type="hidden" name="utm_source" value="wordpress-plugin" />';
258
+ echo '<input type="hidden" name="utm_campaign" value="product-launch-wordpress" />';
259
+ echo '<p>Not an Unbounce customer? ';
260
+ echo get_submit_Button('Try Unbounce For Free', 'secondary', null, false);
261
+ echo '</p>';
262
+ echo '</form>';
263
  }
264
  }
265
 
 
 
 
 
 
 
266
  echo "</div>"; //close ub-plugin-wrapper
267
  }
268
 
css/unbounce-pages.css CHANGED
@@ -13,6 +13,10 @@
13
  margin-top: 30px;
14
  }
15
 
 
 
 
 
16
  .ub-published-pages-heading {
17
  float: left;
18
  margin-right: 10px;
@@ -62,4 +66,4 @@
62
  .ub-table-scroll tbody td, .ub-table-scroll thead th {
63
  width: 100%;
64
  float: left;
65
- }
13
  margin-top: 30px;
14
  }
15
 
16
+ .ub-authorize-message {
17
+ margin-top: 30px;
18
+ }
19
+
20
  .ub-published-pages-heading {
21
  float: left;
22
  margin-right: 10px;
66
  .ub-table-scroll tbody td, .ub-table-scroll thead th {
67
  width: 100%;
68
  float: left;
69
+ }
readme.txt CHANGED
@@ -2,19 +2,17 @@
2
  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.2.2
6
- Stable tag: 0.1.24
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- This Unbounce Plug-In is in Beta Testing, if you are interested in trying it out please contact our support team at: wpbeta@unbounce.com.
11
-
12
- == Description ==
13
-
14
  Unbounce is the most powerful standalone landing page builder
15
  available. With Unbounce, marketers can create fully customized landing pages
16
  for their campaigns and publish them to their existing WordPress sites.
17
 
 
 
18
  Choose from one of Unbounce’s 80+ landing page templates, add copy, then apply
19
  your website’s fonts, colors and images. Unbounce allows you to customize your
20
  landing pages to match your brand perfectly. With the Unbounce WordPress Landing
@@ -45,10 +43,6 @@ OR
45
 
46
  == Frequently Asked Questions ==
47
 
48
- = How do I join the beta test for this plugin? =
49
-
50
- If you are interested trying out the plugin, please contact our support team at wpbeta@unbounce.com.
51
-
52
  = Do I need an Unbounce account? =
53
 
54
  Yes. You need to sign up for Unbounce in order to publish pages. To publish Unbounce pages to your
@@ -83,6 +77,10 @@ to help track down the issue.
83
 
84
  == Changelog ==
85
 
 
 
 
 
86
  = 0.1.19 =
87
  * This release introduces the requirement to authorize your installation with Unbounce. After installing
88
  you will need to go "Unbounce Pages" in the admin section and click "Authorize With Unbounce." You
2
  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.3
6
+ Stable tag: 1.0.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
 
 
 
 
10
  Unbounce is the most powerful standalone landing page builder
11
  available. With Unbounce, marketers can create fully customized landing pages
12
  for their campaigns and publish them to their existing WordPress sites.
13
 
14
+ == Description ==
15
+
16
  Choose from one of Unbounce’s 80+ landing page templates, add copy, then apply
17
  your website’s fonts, colors and images. Unbounce allows you to customize your
18
  landing pages to match your brand perfectly. With the Unbounce WordPress Landing
43
 
44
  == Frequently Asked Questions ==
45
 
 
 
 
 
46
  = Do I need an Unbounce account? =
47
 
48
  Yes. You need to sign up for Unbounce in order to publish pages. To publish Unbounce pages to your
77
 
78
  == Changelog ==
79
 
80
+ = 1.0.0
81
+ * Bug fixes for authorization and caching issues.
82
+ * No longer in beta!
83
+
84
  = 0.1.19 =
85
  * This release introduces the requirement to authorize your installation with Unbounce. After installing
86
  you will need to go "Unbounce Pages" in the admin section and click "Authorize With Unbounce." You