From 261ab3fa5de7b1972dd52e938cdb4abd8d9014df Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 17 May 2023 12:04:38 +0000 Subject: [PATCH] Docs: Correct default value for the `$optimize` option in Style Engine. The default value is set to `true` in `WP_Style_Engine_Processor::get_css()`, but was previously documented as `false` in various DocBlocks. Follow-up to [54156], [55719], [55733], [55819]. See #57840. git-svn-id: https://develop.svn.wordpress.org/trunk@55820 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 2 +- src/wp-includes/style-engine.php | 4 ++-- .../style-engine/class-wp-style-engine-processor.php | 2 +- src/wp-includes/style-engine/class-wp-style-engine.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 4fb9f3059f..b611292dcb 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -3020,7 +3020,7 @@ function wp_enqueue_block_support_styles( $style, $priority = 10 ) { * Default empty array. * * @type bool $optimize Whether to optimize the CSS output, e.g., combine rules. - * Default false. + * Default true. * @type bool $prettify Whether to add new lines and indents to output. * Default to whether the `SCRIPT_DEBUG` constant is defined. * } diff --git a/src/wp-includes/style-engine.php b/src/wp-includes/style-engine.php index 5b5545c85e..4a93d2cc5a 100644 --- a/src/wp-includes/style-engine.php +++ b/src/wp-includes/style-engine.php @@ -130,7 +130,7 @@ function wp_style_engine_get_styles( $block_styles, $options = array() ) { * e.g. 'block-supports' or 'global-styles'. Default 'block-supports'. * When set, the style engine will attempt to store the CSS rules. * @type bool $optimize Whether to optimize the CSS output, e.g. combine rules. - * Default false. + * Default true. * @type bool $prettify Whether to add new lines and indents to output. * Defaults to whether the `SCRIPT_DEBUG` constant is defined. * } @@ -178,7 +178,7 @@ function wp_style_engine_get_stylesheet_from_css_rules( $css_rules, $options = a * Optional. An array of options. Default empty array. * * @type bool $optimize Whether to optimize the CSS output, e.g. combine rules. - * Default false. + * Default true. * @type bool $prettify Whether to add new lines and indents to output. * Defaults to whether the `SCRIPT_DEBUG` constant is defined. * } diff --git a/src/wp-includes/style-engine/class-wp-style-engine-processor.php b/src/wp-includes/style-engine/class-wp-style-engine-processor.php index 05827e41af..c603d1c509 100644 --- a/src/wp-includes/style-engine/class-wp-style-engine-processor.php +++ b/src/wp-includes/style-engine/class-wp-style-engine-processor.php @@ -90,7 +90,7 @@ class WP_Style_Engine_Processor { * Optional. An array of options. Default empty array. * * @type bool $optimize Whether to optimize the CSS output, e.g. combine rules. - * Default false. + * Default true. * @type bool $prettify Whether to add new lines and indents to output. * Defaults to whether the `SCRIPT_DEBUG` constant is defined. * } diff --git a/src/wp-includes/style-engine/class-wp-style-engine.php b/src/wp-includes/style-engine/class-wp-style-engine.php index 9a9da37e69..de8d00467e 100644 --- a/src/wp-includes/style-engine/class-wp-style-engine.php +++ b/src/wp-includes/style-engine/class-wp-style-engine.php @@ -606,7 +606,7 @@ final class WP_Style_Engine { * e.g. 'block-supports' or 'global-styles'. Default 'block-supports'. * When set, the style engine will attempt to store the CSS rules. * @type bool $optimize Whether to optimize the CSS output, e.g. combine rules. - * Default false. + * Default true. * @type bool $prettify Whether to add new lines and indents to output. * Defaults to whether the `SCRIPT_DEBUG` constant is defined. * }