Changeset 56042 for trunk/src/wp-includes/global-styles-and-settings.php
- Timestamp:
- 06/26/2023 07:55:28 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/global-styles-and-settings.php
r56038 r56042 67 67 68 68 /* 69 * Ignore cache when `WP_DEBUG` is enabled, so it doesn't interfere with the theme69 * Ignore cache when the development mode is set to 'theme', so it doesn't interfere with the theme 70 70 * developer's workflow. 71 * 72 * @todo Replace `WP_DEBUG` once an "in development mode" check is available in Core. 73 */ 74 $can_use_cached = ! WP_DEBUG; 71 */ 72 $can_use_cached = wp_get_development_mode() !== 'theme'; 75 73 76 74 $settings = false; … … 152 150 function wp_get_global_stylesheet( $types = array() ) { 153 151 /* 154 * Ignore cache when `WP_DEBUG` is enabled, so it doesn't interfere with the theme152 * Ignore cache when the development mode is set to 'theme', so it doesn't interfere with the theme 155 153 * developer's workflow. 156 * 157 * @todo Replace `WP_DEBUG` once an "in development mode" check is available in Core. 158 */ 159 $can_use_cached = empty( $types ) && ! WP_DEBUG; 154 */ 155 $can_use_cached = empty( $types ) && wp_get_development_mode() !== 'theme'; 160 156 161 157 /* … … 253 249 } 254 250 /* 255 * Ignore cache when `WP_DEBUG` is enabled, so it doesn't interfere with the theme251 * Ignore cache when the development mode is set to 'theme', so it doesn't interfere with the theme 256 252 * developer's workflow. 257 * 258 * @todo Replace `WP_DEBUG` once an "in development mode" check is available in Core. 259 */ 260 $can_use_cached = ! WP_DEBUG; 253 */ 254 $can_use_cached = wp_get_development_mode() !== 'theme'; 261 255 262 256 /* … … 304 298 function wp_get_global_styles_svg_filters() { 305 299 /* 306 * Ignore cache when `WP_DEBUG` is enabled, so it doesn't interfere with the theme300 * Ignore cache when the development mode is set to 'theme', so it doesn't interfere with the theme 307 301 * developer's workflow. 308 * 309 * @todo Replace `WP_DEBUG` once an "in development mode" check is available in Core. 310 */ 311 $can_use_cached = ! WP_DEBUG; 302 */ 303 $can_use_cached = wp_get_development_mode() !== 'theme'; 312 304 $cache_group = 'theme_json'; 313 305 $cache_key = 'wp_get_global_styles_svg_filters'; … … 403 395 null !== $theme_has_support && 404 396 /* 405 * Ignore static cache when `WP_DEBUG` is enabled. Why? To avoid interfering with397 * Ignore static cache when the development mode is set to 'theme', to avoid interfering with 406 398 * the theme developer's workflow. 407 *408 * @todo Replace `WP_DEBUG` once an "in development mode" check is available in Core.409 399 */ 410 ! WP_DEBUG&&400 wp_get_development_mode() !== 'theme' && 411 401 /* 412 402 * Ignore cache when automated test suites are running. Why? To ensure
Note: See TracChangeset
for help on using the changeset viewer.