--- a/wp/wp-includes/customize/class-wp-customize-custom-css-setting.php Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-includes/customize/class-wp-customize-custom-css-setting.php Tue Sep 27 16:37:53 2022 +0200
@@ -145,18 +145,22 @@
}
/**
- * 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( '#</?\w+#', $css ) ) {
@@ -173,11 +177,15 @@
* Store the CSS setting value in the custom_css custom post type for the stylesheet.
*
* @since 4.7.0
+ * @since 5.9.0 Renamed `$css` to `$value` for PHP 8 named parameter support.
*
- * @param string $css The input value.
+ * @param string $value CSS to update.
* @return int|false The post ID or false if the value could not be saved.
*/
- public function update( $css ) {
+ public function update( $value ) {
+ // Restores the more descriptive, specific name for use within this method.
+ $css = $value;
+
if ( empty( $css ) ) {
$css = '';
}