Skip to content

Commit

Permalink
mu-plugins/jquery-filters: Deprecate 'active_plugins'
Browse files Browse the repository at this point in the history
Make this specific to the legacy multisite setup, and ignore it
in the new setup.
  • Loading branch information
Krinkle committed Sep 1, 2023
1 parent 993adbd commit 6a496da
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mu-plugins/jquery-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
$sites = jquery_sites();
$options = array_merge( $options, $sites[ JQUERY_LIVE_SITE ]['options'] );
foreach ( $options as $option => $value ) {
if ( 'stylesheet' === $option || 'template' === $option )
continue; // Don't mess with themes for now.
if ( $option === 'stylesheet' || $option === 'template' ) {
// Don't mess with themes for now.
continue;
}
if ( $option === 'active_plugins' && !defined( 'MULTISITE' ) ) {
// 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;
Expand Down

0 comments on commit 6a496da

Please sign in to comment.