/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
lib/compat/wordpress-7.0/kses.php
22 строки
564 B
tellthemachines
Stabilise viewport based block visibility (#74839)
23 янв 2026, 09:26
Не верифицирован
23 янв 2026, 09:26
10ea412
Код
Авторство
О чём код?
<?php /** * Compatibility shims for KSES (content filtering) for WordPress 7.0. * * @package gutenberg */ /** * Add 'display' to the list of safe CSS properties. * This is needed for viewport visibility support. * * @param array $attr List of allowed CSS attributes. * @return array Modified list of allowed CSS attributes. */ function gutenberg_add_display_to_safe_style_css( $attr ) { if ( ! in_array( 'display', $attr, true ) ) { $attr[] = 'display'; } return $attr; } add_filter( 'safe_style_css', 'gutenberg_add_display_to_safe_style_css' );