Skip to content

Commit 96ea55d

Browse files
committed
Signed-off-by:KProvance <[email protected]>
1 parent 6fc0c4d commit 96ea55d

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ Send me an email at [email protected] so I can add you to our user sp
7878

7979
### Master ###
8080

81+
= 3.3.3.7 =
82+
* Fixed: #1440 - flaw in new cleanFilePath logic.
83+
8184
= 3.3.3.6 =
8285
* Fixed: #1432 - Theme check failing when double-slashes existed in get_template_directory() return.
8386
* Removed: curlRead from helper class.

ReduxCore/framework.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ReduxFramework {
6565
// ATTENTION DEVS
6666
// Please update the build number with each push, no matter how small.
6767
// This will make for easier support when we ask users what version they are using.
68-
public static $_version = '3.3.3.6';
68+
public static $_version = '3.3.3.7';
6969
public static $_dir;
7070
public static $_url;
7171
public static $_upload_dir;

ReduxCore/inc/class.redux_helpers.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,27 @@ public static function isFieldInUse( $parent, $field ) {
5757
}
5858

5959
public static function isParentTheme( $file ) {
60-
if ( strpos( self::cleanFilePath( $file ), self::cleanFilePath( get_template_directory() ) ) !== false ) {
60+
$file = self::cleanFilePath( $file );
61+
$dir = self::cleanFilePath( get_template_directory() );
62+
63+
$file = str_replace('//', '/', $file);
64+
$dir = str_replace('//', '/', $dir);
65+
66+
if ( strpos( $file, $dir ) !== false ) {
6167
return true;
6268
}
6369

6470
return false;
6571
}
6672

6773
public static function isChildTheme( $file ) {
68-
if ( strpos( self::cleanFilePath( $file ), self::cleanFilePath( get_stylesheet_directory() ) ) !== false ) {
74+
$file = self::cleanFilePath( $file );
75+
$dir = self::cleanFilePath( get_stylesheet_directory() );
76+
77+
$file = str_replace('//', '/', $file);
78+
$dir = str_replace('//', '/', $dir);
79+
80+
if ( strpos( $file, $dir ) !== false ) {
6981
return true;
7082
}
7183

@@ -120,7 +132,6 @@ public static function recursive_array_search( $needle, $haystack ) {
120132
*/
121133
public static function cleanFilePath( $path ) {
122134
$path = str_replace( '', '', str_replace( array( "\\", "\\\\" ), '/', $path ) );
123-
$path = str_replace('//', '/', $path);
124135

125136
if ( $path[ strlen( $path ) - 1 ] === '/' ) {
126137
$path = rtrim( $path, '/' );

class.redux-plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ReduxFrameworkPlugin {
2525
* @const string VERSION The plugin version, used for cache-busting and script file references
2626
* @since 3.0.0
2727
*/
28-
const VERSION = '3.3.3.6';
28+
const VERSION = '3.3.3.7';
2929

3030
/**
3131
* @access protected

redux-framework.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Description: Redux is a simple, truly extensible options framework for WordPress themes and plugins.
1313
* Author: Team Redux
1414
* Author URI: http://reduxframework.com
15-
* Version: 3.3.3.6
15+
* Version: 3.3.3.7
1616
* Text Domain: redux-framework
1717
* License: GPL3+
1818
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt

0 commit comments

Comments
 (0)