diff --git a/wp-includes/customize/class-wp-customize-custom-css-setting.php b/wp-includes/customize/class-wp-customize-custom-css-setting.php index b0fd89540b..0e6132f339 100644 --- a/wp-includes/customize/class-wp-customize-custom-css-setting.php +++ b/wp-includes/customize/class-wp-customize-custom-css-setting.php @@ -145,18 +145,22 @@ final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting { } /** - * Validate CSS. + * Validate a received value for being valid CSS. * * Checks for imbalanced braces, brackets, and comments. * Notifications are rendered when the customizer state is saved. * * @since 4.7.0 * @since 4.9.0 Checking for balanced characters has been moved client-side via linting in code editor. + * @since 5.9.0 Renamed `$css` to `$value` for PHP 8 named parameter support. * - * @param string $css The input string. + * @param string $value CSS to validate. * @return true|WP_Error True if the input was validated, otherwise WP_Error. */ - public function validate( $css ) { + public function validate( $value ) { + // Restores the more descriptive, specific name for use within this method. + $css = $value; + $validity = new WP_Error(); if ( preg_match( '#