PluginProbe
Gutenberg / 22.7.0
Gutenberg v22.7.0
24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 All 403 releases
← All changes | lib/class-wp-rest-global-styles-controller-gutenberg.php +1 -9 23.6.2 → 22.7.0 View file →
@@ -697,20 +697,12 @@
697 697 * @since 7.0.0 Only restricts contents which risk prematurely closing the STYLE element,
698 698 * either through a STYLE end tag or a prefix of one which might become a
699 699 * full end tag when combined with the contents of other styles.
700 700 *
701 - * @param mixed $css CSS to validate.
701 + * @param string $css CSS to validate.
702 702 * @return true|WP_Error True if the input was validated, otherwise WP_Error.
703 703 */
704 704 protected function validate_custom_css( $css ) {
705 - if ( ! is_string( $css ) ) {
706 - return new WP_Error(
707 - 'rest_custom_css_invalid_type',
708 - __( 'CSS must be a string.', 'gutenberg' ),
709 - array( 'status' => 400 )
710 - );
711 - }
712 -
713 705 $length = strlen( $css );
714 706 for (
715 707 $at = strcspn( $css, '<' );
716 708 $at < $length;