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