Skip to content

Commit

Permalink
Simplify WP_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Nov 25, 2022
1 parent a8b2676 commit d8996f6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/compat/wordpress-6.2/get-global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,7 @@ function gutenberg_get_global_settings( $path = array(), $context = array() ) {
$cache_key = 'gutenberg_get_global_settings_' . $origin;
$settings = wp_cache_get( $cache_key, $cache_group );

if (
false === $settings ||
( defined( 'WP_DEBUG' ) && WP_DEBUG )
) {
if ( false === $settings || WP_DEBUG ) {
$settings = WP_Theme_JSON_Resolver_Gutenberg::get_merged_data( $origin )->get_settings();
wp_cache_set( $cache_key, $settings, $cache_group );
}
Expand Down

0 comments on commit d8996f6

Please sign in to comment.