Skip to content

Commit 8f47b89

Browse files
committed
Fatal error in WP 6.8 alpha due to this: https://core.trac.wordpress.org/ticket/62244
1 parent 548477d commit 8f47b89

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

class-redux-framework-plugin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@ public static function instance(): ?Redux_Framework_Plugin {
7878
$res = false;
7979

8080
if ( function_exists( 'get_plugin_data' ) && file_exists( $path ) ) {
81-
$data = get_plugin_data( $path );
81+
$data = get_plugin_data( $path, true, false );
8282

8383
if ( isset( $data['Version'] ) && '' !== $data['Version'] ) {
8484
$res = version_compare( $data['Version'], '4', '<' );
8585
}
8686

87-
if ( is_plugin_active( 'redux-framework/redux-framework.php' ) && true === $res ) {
87+
// if ( is_plugin_active( 'redux-framework/redux-framework.php' ) && true === $res ) {
88+
if ( true === $res && ! in_array( 'redux-framework/redux-framework.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) ) {
8889
echo '<div class="error"><p>' . esc_html__( 'Redux Framework version 4 is activated but not loaded. Redux Framework version 3 is still installed and activated. Please deactivate Redux Framework version 3.', 'redux-framework' ) . '</p></div>'; // phpcs:ignore WordPress.Security.EscapeOutput
8990
return null;
9091
}

0 commit comments

Comments
 (0)