Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
13 changes: 0 additions & 13 deletions lib/global-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down Expand Up @@ -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 );
Expand Down