Skip to content

Commit d77b0a7

Browse files
donnchawpmatticbot
authored andcommitted
Boost: Add the rest of the global variables for WP CLI (#43286)
* Add the rest of the global variables for WP CLI * changelog Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/14879890582 Upstream-Ref: Automattic/jetpack@3801b54
1 parent 004a3c3 commit d77b0a7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This is an alpha version! The changes listed here are not final.
1717

1818
### Fixed
1919
- Code: Update stylesheets to use hex instead of named colors.
20+
- General: improve WP CLI support by making variables global
2021
- Linting: Fix more Stylelint violations.
2122

2223
## [2.0.1] - 2025-04-04

wp-cache.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,17 @@ function wpsc_init() {
125125
global $wp_cache_mobile, $wp_cache_mobile_enabled, $wp_cache_mobile_browsers, $wp_cache_mobile_prefixes;
126126
global $wp_cache_config_file, $wp_cache_config_file_sample;
127127

128+
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
129+
global $wpsc_advanced_cache_filename, $wpsc_advanced_cache_dist_filename;
130+
global $wp_cache_phase1_loaded, $blog_cache_dir, $wp_supercache_304, $wp_cache_mfunc_enabled;
131+
global $wp_cache_front_page_checks, $wpsc_save_headers, $is_nginx, $wpsc_promo_links;
132+
global $wp_cache_disable_utf8, $wp_cache_not_logged_in, $wp_cache_make_known_anon;
133+
global $wpsc_tracking_parameters, $wpsc_rejected_cookies, $cache_rejected_uri;
134+
global $cache_acceptable_files, $wp_super_cache_comments;
135+
global $wp_super_cache_front_page_check, $wp_super_cache_front_page_clear;
136+
global $wp_super_cache_front_page_text, $wp_super_cache_front_page_notification;
137+
global $wpsc_plugins, $wpsc_cookies, $wpsc_version, $wp_cache_clear_on_post_edit;
138+
// phpcs:enable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
128139
// Check is cache config already loaded.
129140
if ( ! isset( $cache_enabled, $super_cache_enabled, $wp_cache_mod_rewrite, $cache_path ) &&
130141
empty( $wp_cache_phase1_loaded ) &&

0 commit comments

Comments
 (0)