PluginProbe
Gutenberg / 23.4.0
Gutenberg v23.4.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 12.6.0 7.4.0 All 402 releases
gutenberg / lib / compat / wordpress-7.0 / kses.php

kses.php in Gutenberg 23.4.0, at lib/compat/wordpress-7.0/kses.php

23 lines 564 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.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