Skip to content

Commit edca2a2

Browse files
committed
Update comments and document in since annotation
1 parent 511284e commit edca2a2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/wp-includes/customize/class-wp-customize-custom-css-setting.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ public function value() {
145145
}
146146

147147
/**
148-
* Validate a received value for being valid CSS.
148+
* Validate a received value for being safe HTML STYLE tag contents.
149149
*
150-
* Checks for imbalanced braces, brackets, and comments.
151150
* Notifications are rendered when the customizer state is saved.
152151
*
153152
* @since 4.7.0
154153
* @since 4.9.0 Checking for balanced characters has been moved client-side via linting in code editor.
155154
* @since 5.9.0 Renamed `$css` to `$value` for PHP 8 named parameter support.
155+
* @since 7.0.0 Relaxed to only check for safe HTML STYLE tag contents.
156156
*
157157
* @param string $value CSS to validate.
158158
* @return true|WP_Error True if the input was validated, otherwise WP_Error.

src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,11 @@ public function get_theme_items( $request ) {
659659
/**
660660
* Validate style.css as valid CSS.
661661
*
662-
* Currently just checks for invalid markup.
662+
* Currently just checks that CSS will not break an HTML STYLE tag.
663663
*
664664
* @since 6.2.0
665665
* @since 6.4.0 Changed method visibility to protected.
666+
* @since 7.0.0 Relaxed to only check for safe HTML STYLE tag contents.
666667
*
667668
* @param string $css CSS to validate.
668669
* @return true|WP_Error True if the input was validated, otherwise WP_Error.

0 commit comments

Comments
 (0)