WPtouch - Version 4.3.2

Version Description

Download this release

Release Info

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

Code changes from version 4.3.1 to 4.3.2

Files changed (4) hide show
  1. core/class-cache-smash.php +11 -15
  2. lang/wptouch.pot +2 -2
  3. readme.txt +5 -1
  4. wptouch.php +2 -2
core/class-cache-smash.php CHANGED
@@ -18,7 +18,10 @@ class WPtouchCacheSmash {
18
  }
19
 
20
  private function is_w3_plugin_detected() {
21
- return defined( 'W3TC' );
 
 
 
22
  }
23
 
24
  private function is_wp_super_cache_detected() {
@@ -93,15 +96,13 @@ class WPtouchCacheSmash {
93
 
94
  // Check W3
95
  if ( $this->is_w3_plugin_detected() ) {
 
96
  if( version_compare( W3TC_VERSION, '0.9.5', ">=" ) ) {
97
- $w3tc_095_or_greater = true;
98
- }
99
- else {
100
- $w3tc_095_or_greater = false;
101
- }
102
 
103
- if ( $w3tc_095_or_greater ) {
104
- $w3_config = new \W3TC\Config( true );
105
  }
106
  else {
107
  $w3_config = new W3_Config( true );
@@ -109,14 +110,9 @@ class WPtouchCacheSmash {
109
 
110
  if ( $w3_config ) {
111
  // Check to see if the Page Cache is enabled
112
- if ( ( $w3tc_095_or_greater && $w3_config->get( 'pgcache.enabled' ) ) || ( !$w3tc_095_or_greater && $w3_config->get_cache_option( 'pgcache.enabled' ) ) ) {
113
  // If it's enabled, we need to make sure the user agents have been updated
114
- if ( $w3tc_095_or_greater ) {
115
- $rejected_user_agents = $w3_config->get( 'pgcache.reject.ua' );
116
- }
117
- else {
118
- $rejected_user_agents = $w3_config->get_cache_option( 'pgcache.reject.ua' );
119
- }
120
 
121
  if ( !$this->find_in_array_no_case( 'iphone', $rejected_user_agents ) ) {
122
  $cache_configured = false;
18
  }
19
 
20
  private function is_w3_plugin_detected() {
21
+ return (
22
+ defined( 'W3TC' ) &&
23
+ defined( 'W3TC_DIR' )
24
+ );
25
  }
26
 
27
  private function is_wp_super_cache_detected() {
96
 
97
  // Check W3
98
  if ( $this->is_w3_plugin_detected() ) {
99
+
100
  if( version_compare( W3TC_VERSION, '0.9.5', ">=" ) ) {
101
+ if ( !function_exists( 'w3_instance' ) ) {
102
+ require_once W3TC_DIR . '/inc/define.php';
103
+ }
 
 
104
 
105
+ $w3_config = w3_instance( 'W3_Config' );
 
106
  }
107
  else {
108
  $w3_config = new W3_Config( true );
110
 
111
  if ( $w3_config ) {
112
  // Check to see if the Page Cache is enabled
113
+ if ( $w3_config->get( 'pgcache.enabled' ) ) {
114
  // If it's enabled, we need to make sure the user agents have been updated
115
+ $rejected_user_agents = $w3_config->get( 'pgcache.reject.ua' );
 
 
 
 
 
116
 
117
  if ( !$this->find_in_array_no_case( 'iphone', $rejected_user_agents ) ) {
118
  $cache_configured = false;
lang/wptouch.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the WPtouch Mobile Plugin package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WPtouch Mobile Plugin 4.3.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wptouch\n"
7
- "POT-Creation-Date: 2016-09-27 14:58:33+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the WPtouch Mobile Plugin package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WPtouch Mobile Plugin 4.3.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wptouch\n"
7
+ "POT-Creation-Date: 2016-09-28 14:27:57+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
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.3.1
6
  Tested up to: 4.6
7
  License: GPLv2
8
 
@@ -33,6 +33,10 @@ For more information visit [WPtouch.com](http://www.wptouch.com/?utm_campaign=wp
33
 
34
  == Changelog ==
35
 
 
 
 
 
36
  = Version 4.3.1 (September 27, 2016) =
37
 
38
  * Fixed: Issue in Bauhaus theme related to old versions of PHP
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.3.2
6
  Tested up to: 4.6
7
  License: GPLv2
8
 
33
 
34
  == Changelog ==
35
 
36
+ = Version 4.3.2 (September 28, 2016) =
37
+
38
+ * Fixed: Better compatibility with W3TC and PHP 5.2
39
+
40
  = Version 4.3.1 (September 27, 2016) =
41
 
42
  * Fixed: Issue in Bauhaus theme related to old versions of PHP
wptouch.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: WPtouch Mobile Plugin
4
  Plugin URI: http://www.wptouch.com/
5
- Version: 4.3.1
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.3.1' );
18
 
19
  define( 'WPTOUCH_BASE_NAME', basename( __FILE__, '.php' ) . '.php' );
20
  define( 'WPTOUCH_DIR', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . basename( __FILE__, '.php' ) );
2
  /*
3
  Plugin Name: WPtouch Mobile Plugin
4
  Plugin URI: http://www.wptouch.com/
5
+ Version: 4.3.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
 
15
  function wptouch_create_four_object() {
16
  if ( !defined( 'WPTOUCH_IS_PRO' ) ) {
17
+ define( 'WPTOUCH_VERSION', '4.3.2' );
18
 
19
  define( 'WPTOUCH_BASE_NAME', basename( __FILE__, '.php' ) . '.php' );
20
  define( 'WPTOUCH_DIR', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . basename( __FILE__, '.php' ) );