WPtouch - Version 4.2.3

Version Description

Download this release

Release Info

Developer bravenewcode
Plugin Icon 128x128 WPtouch
Version 4.2.3
Comparing to
See all releases

Code changes from version 4.2.2 to 4.2.3

admin/css/wptouch-admin-4.css CHANGED
@@ -2365,6 +2365,36 @@ p.deploy-text {
2365
  min-height: 280px;
2366
  }
2367
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2368
 
2369
 
2370
  /* @end */
2365
  min-height: 280px;
2366
  }
2367
 
2368
+ .wptouch_page_wptouch-admin-go-pro #wptouch-settings-content {
2369
+ margin-left: 0px;
2370
+ border-left: none;
2371
+ padding-top: 8px;
2372
+ text-align: center;
2373
+ }
2374
+
2375
+ .wptouch_page_wptouch-admin-go-pro #wptouch-settings-content p {
2376
+ font-size: 15px;
2377
+ }
2378
+
2379
+ .wptouch_page_wptouch-admin-go-pro #wptouch-settings-content input {
2380
+ margin: 3px auto;
2381
+ }
2382
+
2383
+ .wptouch_page_wptouch-admin-go-pro #activate-license {
2384
+ margin-top: 10px;
2385
+ }
2386
+
2387
+ .wptouch_page_wptouch-admin-go-pro #wptouch-preview-theme {
2388
+ display: none;
2389
+ }
2390
+
2391
+ .wptouch_page_wptouch-admin-go-pro .reset-button {
2392
+ display: none;
2393
+ }
2394
+
2395
+ .wptouch_page_wptouch-admin-go-pro #license-settings-area {
2396
+ height: 180px;
2397
+ }
2398
 
2399
 
2400
  /* @end */
admin/pages/custom/wptouch-admin-go-pro.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $settings = wptouch_get_settings( 'bncid' ); ?>
2
+ <?php if ( wptouch_is_path_writable( WP_PLUGIN_DIR ) && wptouch_is_path_writable( WPTOUCH_DIR ) ) { ?>
3
+ <p>If you have a licence for WPtouch Pro you can enter it here and unlock all of WPtouch Pro's features. <br />To purchase a license, please visit <a href="http://www.wptouch.com/?utm_source=wptouch&utm_medium=web&utm_campaign=upgrade-to-pro-top">wptouch.com</a>.</p>
4
+ <div id="license-settings-area" class="wptouch-clearfix">
5
+ <input class="license-inputs" type="text" placeholder="<?php _e( 'Account E-Mail Address', 'wptouch-pro' ); ?>" id="license_email" name="<?php echo wptouch_admin_get_manual_encoded_setting_name( 'bncid', 'bncid' ); ?>" value="<?php if ( $settings->bncid ) echo $settings->bncid; else ''; ?>" />
6
+
7
+ <input class="license-inputs" type="text" placeholder="<?php _e( 'Product License Key', 'wptouch-pro' ); ?>" id="license_key" name="<?php echo wptouch_admin_get_manual_encoded_setting_name( 'bncid', 'bncid' ); ?>" value="<?php if ( $settings->wptouch_license_key ) echo $settings->wptouch_license_key; else ''; ?>" />
8
+
9
+ <div id="activate-license">
10
+ <a href="#" class="activate button"><?php _e( 'Activate WPtouch Pro', 'wptouch-pro' ); ?></a>
11
+ </div>
12
+ </div>
13
+ <?php } ?>
14
+
15
+ <div id="upgrade-area">
16
+ <!-- ajaxed -->
17
+ </div>
18
+
19
+ <?php include_once( WPTOUCH_ADMIN_DIR . '/html/license-modals.php' ); ?>
admin/pages/wptouch-admin-general-settings.php CHANGED
@@ -12,7 +12,6 @@ add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch
12
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_menu_page' );
13
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_themes' );
14
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_theme_customize_page' );
15
- add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_theme_gopro_page' );
16
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_addons' );
17
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_addon_settings' );
18
 
@@ -651,26 +650,6 @@ function wptouch_render_theme_customize_page( $page_options ) {
651
  return $page_options;
652
  }
653
 
654
- function wptouch_render_theme_gopro_page( $page_options ) {
655
-
656
- wptouch_add_sub_page( WPTOUCH_PRO_ADMIN_THEME_GOPRO, 'foundation-page-theme-gopro', $page_options );
657
-
658
- wptouch_add_page_section(
659
- WPTOUCH_PRO_ADMIN_THEME_GOPRO,
660
- __( 'Go Pro', 'wptouch-pro' ),
661
- 'handle-gopro',
662
- array(
663
- wptouch_add_setting(
664
- 'custom',
665
- 'gopro'
666
- )
667
- ),
668
- $page_options
669
- );
670
-
671
- return $page_options;
672
- }
673
-
674
  function wptouch_render_themes( $page_options ) {
675
 
676
  require_once( WPTOUCH_DIR . '/core/admin-themes.php' );
12
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_menu_page' );
13
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_themes' );
14
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_theme_customize_page' );
 
15
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_addons' );
16
  add_filter( 'wptouch_admin_page_render_wptouch-admin-general-settings', 'wptouch_render_addon_settings' );
17
 
650
  return $page_options;
651
  }
652
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
653
  function wptouch_render_themes( $page_options ) {
654
 
655
  require_once( WPTOUCH_DIR . '/core/admin-themes.php' );
core/admin-ajax.php CHANGED
@@ -59,7 +59,7 @@ function wptouch_admin_handle_ajax( &$wptouch_pro, $ajax_action ) {
59
  echo $backup_file;
60
  break;
61
  case 'load-upgrade-area':
62
- $content = wp_remote_get( 'http://wptouch-pro-4.s3.amazonaws.com/free-upgrade-area/page.xhtml' );
63
 
64
  if ( !is_wp_error( $content ) ) {
65
  echo $content['body'];
59
  echo $backup_file;
60
  break;
61
  case 'load-upgrade-area':
62
+ $content = wp_remote_get( 'http://wptouch-pro-4.s3.amazonaws.com/free-upgrade-area/4.2/page.xhtml' );
63
 
64
  if ( !is_wp_error( $content ) ) {
65
  echo $content['body'];
core/admin-menu.php CHANGED
@@ -23,6 +23,7 @@ define( 'WPTOUCH_PRO_ADMIN_WIZARD', 'wptouch-admin-wizard' );
23
  define( 'WPTOUCH_PRO_ADMIN_GENERAL_SETTINGS', 'wptouch-admin-general-settings' );
24
  define( 'WPTOUCH_PRO_ADMIN_MULTISITE_SETTINGS', 'wptouch-multisite' );
25
  define( 'WPTOUCH_PRO_ADMIN_LICENSE', 'wptouch-admin-license' );
 
26
 
27
  function wptouch_admin_create_menu( $id, $friendly_name, $menu_type = WPTOUCH_PRO_ADMIN_SETTINGS_PAGE, $display_name = false ) {
28
  $menu = new stdClass;
@@ -93,6 +94,10 @@ function wptouch_admin_get_predefined_menus( $network_admin = false ) {
93
  unset( $available_menus[ WPTOUCH_PRO_ADMIN_LICENSE ] );
94
  }
95
 
 
 
 
 
96
  return apply_filters( 'wptouch_available_menus', $available_menus );
97
  }
98
 
23
  define( 'WPTOUCH_PRO_ADMIN_GENERAL_SETTINGS', 'wptouch-admin-general-settings' );
24
  define( 'WPTOUCH_PRO_ADMIN_MULTISITE_SETTINGS', 'wptouch-multisite' );
25
  define( 'WPTOUCH_PRO_ADMIN_LICENSE', 'wptouch-admin-license' );
26
+ define( 'WPTOUCH_PRO_ADMIN_GO_PRO', 'wptouch-admin-go-pro' );
27
 
28
  function wptouch_admin_create_menu( $id, $friendly_name, $menu_type = WPTOUCH_PRO_ADMIN_SETTINGS_PAGE, $display_name = false ) {
29
  $menu = new stdClass;
94
  unset( $available_menus[ WPTOUCH_PRO_ADMIN_LICENSE ] );
95
  }
96
 
97
+ if ( defined( 'WPTOUCH_IS_FREE' ) ) {
98
+ $available_menus[ WPTOUCH_PRO_ADMIN_GO_PRO ] = wptouch_admin_create_menu( WPTOUCH_PRO_ADMIN_GO_PRO, 'Upgrade to Pro', WPTOUCH_PRO_ADMIN_CUSTOM_PAGE );
99
+ }
100
+
101
  return apply_filters( 'wptouch_available_menus', $available_menus );
102
  }
103
 
core/admin-render.php CHANGED
@@ -76,7 +76,6 @@
76
  <?php if ( wptouch_admin_use_customizer() ) { ?>
77
  <li><a href="#" class="<?php wptouch_multisite_page_classes( 'themes' ); ?> foundation-page-theme-customizer<?php if ( isset( $_COOKIE['wptouch-4-admin-menu'] ) && ( $_COOKIE['wptouch-4-admin-menu'] == 'foundation-page-theme-customizer' ) ) { echo ' active'; } ?>" data-page-slug="foundation-page-theme-customizer"><?php _e( 'Customize Theme', 'wptouch-pro' ); ?></a></li>
78
  <?php } ?>
79
- <li><a href="#" class="foundation-page-theme-gopro<?php if ( isset( $_COOKIE['wptouch-4-admin-menu'] ) && ( $_COOKIE['wptouch-4-admin-menu'] == 'foundation-page-theme-gopro' ) ) { echo ' active'; } ?>" data-page-slug="foundation-page-theme-gopro"><?php _e( 'WPtouch Pro', 'wptouch-pro' ); ?></a></li>
80
  <?php } elseif ( !is_network_admin() ) { ?>
81
  <?php if ( wptouch_can_show_page( 'general' ) ) { ?>
82
  <li><a href="#" class="<?php wptouch_multisite_page_classes( 'general' ); ?> setup-general-general<?php if ( isset( $_COOKIE['wptouch-4-admin-menu'] ) && ( $_COOKIE['wptouch-4-admin-menu'] == 'setup-general-general' ) ) { echo ' active'; } ?>" data-page-slug="setup-general-general"><?php _e( 'General', 'wptouch-pro' ); ?></a></li>
76
  <?php if ( wptouch_admin_use_customizer() ) { ?>
77
  <li><a href="#" class="<?php wptouch_multisite_page_classes( 'themes' ); ?> foundation-page-theme-customizer<?php if ( isset( $_COOKIE['wptouch-4-admin-menu'] ) && ( $_COOKIE['wptouch-4-admin-menu'] == 'foundation-page-theme-customizer' ) ) { echo ' active'; } ?>" data-page-slug="foundation-page-theme-customizer"><?php _e( 'Customize Theme', 'wptouch-pro' ); ?></a></li>
78
  <?php } ?>
 
79
  <?php } elseif ( !is_network_admin() ) { ?>
80
  <?php if ( wptouch_can_show_page( 'general' ) ) { ?>
81
  <li><a href="#" class="<?php wptouch_multisite_page_classes( 'general' ); ?> setup-general-general<?php if ( isset( $_COOKIE['wptouch-4-admin-menu'] ) && ( $_COOKIE['wptouch-4-admin-menu'] == 'setup-general-general' ) ) { echo ' active'; } ?>" data-page-slug="setup-general-general"><?php _e( 'General', 'wptouch-pro' ); ?></a></li>
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: bravenewcode, duanestorey, dalemugford, adamdipardo
3
  Tags: wptouch, iphone, ipod, bravenewcode, mobile, mobile-friendly, android, blackberry, smartphone, responsive, design, mobile plugin, ios, mobile theme
4
  Requires at least: 4.2
5
- Stable tag: 4.2.2
6
  Tested up to: 4.6
7
  License: GPLv2
8
 
@@ -33,9 +33,10 @@ For more information visit [WPtouch.com](http://www.wptouch.com/?utm_campaign=wp
33
 
34
  == Changelog ==
35
 
36
- = Version 4.2.2 (August 8, 2016) =
37
 
38
  * Fixed: Made notices banner only show for administrators
 
39
 
40
  = Version 4.2.1 (August 5, 2016) =
41
 
2
  Contributors: bravenewcode, duanestorey, dalemugford, adamdipardo
3
  Tags: wptouch, iphone, ipod, bravenewcode, mobile, mobile-friendly, android, blackberry, smartphone, responsive, design, mobile plugin, ios, mobile theme
4
  Requires at least: 4.2
5
+ Stable tag: 4.2.3
6
  Tested up to: 4.6
7
  License: GPLv2
8
 
33
 
34
  == Changelog ==
35
 
36
+ = Version 4.2.3 (August 8, 2016) =
37
 
38
  * Fixed: Made notices banner only show for administrators
39
+ * Updated: Enhanced the ability to upgrade free version
40
 
41
  = Version 4.2.1 (August 5, 2016) =
42
 
wptouch.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: WPtouch Mobile Plugin
4
  Plugin URI: http://www.wptouch.com/
5
- Version: 4.2.2
6
  Description: Make a beautiful mobile-friendly version of your website with just a few clicks
7
  Author: BraveNewCode Inc.
8
  Author URI: http://www.bravenewcode.com/
@@ -14,7 +14,7 @@
14
 
15
  function wptouch_create_four_object() {
16
  if ( !defined( 'WPTOUCH_IS_PRO' ) ) {
17
- define( 'WPTOUCH_VERSION', '4.2.2' );
18
 
19
  define( 'WPTOUCH_BASE_NAME', basename( __FILE__, '.php' ) . '.php' );
20
  define( 'WPTOUCH_DIR', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . basename( __FILE__, '.php' ) );
@@ -146,7 +146,7 @@ function wptouch_free_admin_notice() {
146
 
147
  if ( current_user_can( 'activate_plugins' ) ) {
148
  $random_num = wptouch_free_get_random_site( 2 );
149
- if ( !get_user_meta( $user_id, 'wptouch_free_message_419' ) ) {
150
  echo '<div style="position:relative;" class="notice notice-success">';
151
  switch( $random_num ) {
152
  case 0:
@@ -172,9 +172,10 @@ function wptouch_free_admin_notice_dismiss() {
172
  $user_id = $current_user->ID;
173
 
174
  /* If user clicks to ignore the notice, add that to their user meta */
175
- if ( isset( $_GET['wptouch_free_message_419'] ) && $_GET['wptouch_free_message_419'] == '1' ) {
176
  setcookie( 'wptouch_customizer_mode', 'mobile', 0, '/' );
177
- add_user_meta( $user_id, 'wptouch_free_message_419', '1' );
 
178
  }
179
 
180
  }
2
  /*
3
  Plugin Name: WPtouch Mobile Plugin
4
  Plugin URI: http://www.wptouch.com/
5
+ Version: 4.2.3
6
  Description: Make a beautiful mobile-friendly version of your website with just a few clicks
7
  Author: BraveNewCode Inc.
8
  Author URI: http://www.bravenewcode.com/
14
 
15
  function wptouch_create_four_object() {
16
  if ( !defined( 'WPTOUCH_IS_PRO' ) ) {
17
+ define( 'WPTOUCH_VERSION', '4.2.3' );
18
 
19
  define( 'WPTOUCH_BASE_NAME', basename( __FILE__, '.php' ) . '.php' );
20
  define( 'WPTOUCH_DIR', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . basename( __FILE__, '.php' ) );
146
 
147
  if ( current_user_can( 'activate_plugins' ) ) {
148
  $random_num = wptouch_free_get_random_site( 2 );
149
+ if ( !get_user_meta( $user_id, 'wptouch_free_message_419', true ) ) {
150
  echo '<div style="position:relative;" class="notice notice-success">';
151
  switch( $random_num ) {
152
  case 0:
172
  $user_id = $current_user->ID;
173
 
174
  /* If user clicks to ignore the notice, add that to their user meta */
175
+ if ( isset( $_GET[ 'wptouch_free_message_419' ] ) && $_GET[ 'wptouch_free_message_419' ] == '1' ) {
176
  setcookie( 'wptouch_customizer_mode', 'mobile', 0, '/' );
177
+
178
+ update_user_meta( $user_id, 'wptouch_free_message_419', '1' );
179
  }
180
 
181
  }