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

Commit 5bf5b6f

Browse files
committed
Small fix for disable filter.
1 parent 23a1e7f commit 5bf5b6f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

redux-core/inc/classes/class-redux-enable-gutenberg.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ public function run_user_actions() {
370370

371371
if ( isset( $_GET[ $this->nobug_option ] ) ) { // User doesn't want to see this anymore.
372372
add_site_option( $this->nobug_option, true );
373-
374373
return; // No need to redirect.
375374
} elseif ( isset( $_GET[ $this->autoenable_option ] ) ) { // User has opted to just auto-enable Gutenberg.
376375
unset( $_GET[ $this->autoenable_option ] );
@@ -424,7 +423,7 @@ private function check_for_filter() {
424423
private function remove_filter() {
425424
global $pagenow;
426425

427-
if ( is_admin() && ! self::$is_disabled && ( 'post-new.php' === $pagenow || 'post.php' === $pagenow ) ) {
426+
if ( is_admin() && ( 'post-new.php' === $pagenow || 'post.php' === $pagenow ) ) {
428427
// We only want to do this for posts or pages.
429428
if ( ! isset( $_GET['post_type'] ) || ( isset( $_GET['post_type'] ) && 'page' === $_GET['post_type'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
430429
if ( version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' ) ) {

0 commit comments

Comments
 (0)