PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.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 All 404 releases
gutenberg / lib / compat / wordpress-7.2 / kses.php

kses.php in Gutenberg 24.1.0, at lib/compat/wordpress-7.2/kses.php

23 lines 606 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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