Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

Commit 1197503

Browse files
committed
#202 - Website slowdown fix.
Signed-off-by: Kevin Provance <kevin.provance@gmail.com>
1 parent 4110d43 commit 1197503

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

redux-core/inc/classes/class-redux-functions-ex.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,13 @@ public static function is_inside_theme( $file = '' ) {
309309
if ( false !== $key ) {
310310
unset( $theme_paths[ $key ] );
311311
}
312-
$data['parent_slug'] = end( $theme_paths );
313-
$data['parent_slug'] = explode( '/', $data['parent_slug'] );
314-
$data['parent_slug'] = end( $data['parent_slug'] );
312+
313+
$theme_paths_end = end( $theme_paths );
314+
$parent_slug_end = explode( '/', $theme_paths_end );
315+
$parent_slug_end = end( $parent_slug_end );
316+
317+
$data['parent_slug'] = $theme_paths_end;
318+
$data['parent_slug'] = $parent_slug_end;
315319
}
316320

317321
return $data;

0 commit comments

Comments
 (0)