From 1b4970fafe4d98b4f9080d532b0fce94ce93e0d9 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Fri, 12 Jul 2024 18:43:46 -0400 Subject: [PATCH] plugins: restore puppet management of staging plugins - localhost can still bypass this behavior by setting JQUERY_STAGING to 'local' --- plugins/jquery-filters.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/jquery-filters.php b/plugins/jquery-filters.php index 19c06afd..d4ed1510 100644 --- a/plugins/jquery-filters.php +++ b/plugins/jquery-filters.php @@ -14,17 +14,18 @@ $sites = jquery_sites(); $options = array_merge( $options, $sites[ JQUERY_LIVE_SITE ]['options'] ); foreach ( $options as $option => $value ) { - // Skip these in production, where they are managed by puppet. - // Staging should be allowed to set them for testing. + // Skip these on live sites (both production and staging), + // where they are managed by puppet. // Local testing with a fresh database does not // currently work if these are skipped. - if ( !JQUERY_STAGING ) { + if ( JQUERY_STAGING !== 'local' ) { if ( $option === 'stylesheet' || $option === 'template' ) { // Don't mess with themes for now. continue; } if ( $option === 'active_plugins' ) { - // In production, Puppet manages activation of per-site plugins. + // On live sites (including staging ones), + // Puppet manages activation of per-site plugins. continue; } }