From 2baee5e7413613fff1a3e218bff9bdffd0343e9e Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 1 Sep 2023 22:04:15 +0100 Subject: [PATCH] mu-plugins/jquery-filters: Remove blog_id condition In standalone mode, this isn't set. Follows-up 863a48ed7c61, which added it to support "switch_to_blog". I don't know what that is exactly, but I know this code can't be having a useful effect because the surrounding code changed since then. It now uses JQUERY_LIVE_SITE which can only be set once, so at most this conditional can change it from applying to not applying overrides. Maybe there's a context during sunrise.php where this matters, but we are not creating new sites in the legacy mutlisite setup. --- mu-plugins/jquery-filters.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mu-plugins/jquery-filters.php b/mu-plugins/jquery-filters.php index 28866d1b..adc28750 100644 --- a/mu-plugins/jquery-filters.php +++ b/mu-plugins/jquery-filters.php @@ -22,10 +22,8 @@ // For standalone sites, let Puppet manage plugins. continue; } - add_filter( 'pre_option_' . $option, function( $null ) use ( $value, $blog_id ) { - if ( $blog_id == get_current_blog_id() ) - return $value; - return $null; + add_filter( 'pre_option_' . $option, function () use ( $value ) { + return $value; } ); } unset( $sites, $options, $option );