Skip to content

plugins: allow staging to set all filter options #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions plugins/jquery-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@
$sites = jquery_sites();
$options = array_merge( $options, $sites[ JQUERY_LIVE_SITE ]['options'] );
foreach ( $options as $option => $value ) {
if ( $option === 'stylesheet' || $option === 'template' ) {
// Don't mess with themes for now.
continue;
}
if ( $option === 'active_plugins' ) {
// Deprecated
// In production, Puppet manages activation of per-site plugins.
// Locally, global plugins are enabled via mu-plugins/_loader.php,
// and per-site plugins are activated by the imported database.
continue;
// Skip these in production, where they are managed by puppet.
// Staging should be allowed to set them for testing.
// Local testing with a fresh database does not
// currently work if these are skipped.
if ( !JQUERY_STAGING ) {
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.
continue;
}
}
add_filter( 'pre_option_' . $option, function () use ( $value ) {
return $value;
Expand Down
Loading