Skip to content

Commit 8639048

Browse files
authored
plugins: allow staging to set all filter options
Closes gh-458
1 parent c84413e commit 8639048

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

plugins/jquery-filters.php

+13-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,19 @@
1414
$sites = jquery_sites();
1515
$options = array_merge( $options, $sites[ JQUERY_LIVE_SITE ]['options'] );
1616
foreach ( $options as $option => $value ) {
17-
if ( $option === 'stylesheet' || $option === 'template' ) {
18-
// Don't mess with themes for now.
19-
continue;
20-
}
21-
if ( $option === 'active_plugins' ) {
22-
// Deprecated
23-
// In production, Puppet manages activation of per-site plugins.
24-
// Locally, global plugins are enabled via mu-plugins/_loader.php,
25-
// and per-site plugins are activated by the imported database.
26-
continue;
17+
// Skip these in production, where they are managed by puppet.
18+
// Staging should be allowed to set them for testing.
19+
// Local testing with a fresh database does not
20+
// currently work if these are skipped.
21+
if ( !JQUERY_STAGING ) {
22+
if ( $option === 'stylesheet' || $option === 'template' ) {
23+
// Don't mess with themes for now.
24+
continue;
25+
}
26+
if ( $option === 'active_plugins' ) {
27+
// In production, Puppet manages activation of per-site plugins.
28+
continue;
29+
}
2730
}
2831
add_filter( 'pre_option_' . $option, function () use ( $value ) {
2932
return $value;

0 commit comments

Comments
 (0)