| 1 |
<?php |
| 2 |
/** |
| 3 |
* Compatibility shims for KSES (content filtering) for WordPress 7.0. |
| 4 |
* |
| 5 |
* @package gutenberg |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Add 'display' to the list of safe CSS properties. |
| 10 |
* This is needed for viewport visibility support. |
| 11 |
* |
| 12 |
* @param array $attr List of allowed CSS attributes. |
| 13 |
* @return array Modified list of allowed CSS attributes. |
| 14 |
*/ |
| 15 |
function gutenberg_add_display_to_safe_style_css( $attr ) { |
| 16 |
if ( ! in_array( 'display', $attr, true ) ) { |
| 17 |
$attr[] = 'display'; |
| 18 |
} |
| 19 |
|
| 20 |
return $attr; |
| 21 |
} |
| 22 |
add_filter( 'safe_style_css', 'gutenberg_add_display_to_safe_style_css' ); |
| 23 |
|