diff --git a/lib/compat.php b/lib/compat.php index 917d22fe733704..8d1f908161870e 100644 --- a/lib/compat.php +++ b/lib/compat.php @@ -186,6 +186,7 @@ function gutenberg_safe_style_attrs( $attrs ) { $attrs[] = 'border-top-right-radius'; $attrs[] = 'border-bottom-right-radius'; $attrs[] = 'border-bottom-left-radius'; + $attrs[] = 'filter'; return $attrs; } diff --git a/lib/global-styles.php b/lib/global-styles.php index 5dfefe0d1df27c..eeb05cbd627e1f 100644 --- a/lib/global-styles.php +++ b/lib/global-styles.php @@ -215,7 +215,6 @@ function gutenberg_global_styles_filter_post( $content ) { */ function gutenberg_global_styles_kses_init_filters() { add_filter( 'content_save_pre', 'gutenberg_global_styles_filter_post' ); - add_filter( 'safe_style_css', 'gutenberg_global_styles_include_support_for_duotone', 10, 2 ); } /** @@ -287,18 +286,6 @@ function gutenberg_global_styles_include_support_for_wp_variables( $allow_css, $ return ! ! preg_match( '/^var\(--wp-[a-zA-Z0-9\-]+\)$/', trim( $parts[1] ) ); } -/** - * This is for using kses to test user data. - * - * @param array $atts Allowed CSS property names, according to kses. - * - * @return array The new allowed CSS property names. - */ -function gutenberg_global_styles_include_support_for_duotone( $atts ) { - $atts[] = 'filter'; - return $atts; -} - // The else clause can be removed when plugin support requires WordPress 5.8.0+. if ( function_exists( 'get_block_editor_settings' ) ) { add_filter( 'block_editor_settings_all', 'gutenberg_experimental_global_styles_settings', PHP_INT_MAX );