Skip to content

Commit

Permalink
mu-plugins/jquery-filters: Remove blog_id condition
Browse files Browse the repository at this point in the history
In standalone mode, this isn't set.

Follows-up 863a48e, 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.
  • Loading branch information
Krinkle committed Sep 1, 2023
1 parent bdbbe82 commit 2baee5e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mu-plugins/jquery-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 2baee5e

Please sign in to comment.