WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Customize_Widgets::filter_wp_kses_allowed_data_attributes() public WP 4.5.0

Ensures the HTML data-* attributes for selective refresh are allowed by kses.

This is needed in case the $before_widget is run through wp_kses() when printed.

Это метод класса: WP_Customize_Widgets{}

Хуков нет.

Возвращает

Массив. (Maybe) modified allowed HTML.

Использование

$WP_Customize_Widgets = new WP_Customize_Widgets();
$WP_Customize_Widgets->filter_wp_kses_allowed_data_attributes( $allowed_html );
$allowed_html(массив) (обязательный)
Allowed HTML.

Список изменений

С версии 4.5.0 Введена.

Код WP_Customize_Widgets::filter_wp_kses_allowed_data_attributes() WP 5.5.1

wp-includes/class-wp-customize-widgets.php
<?php
public function filter_wp_kses_allowed_data_attributes( $allowed_html ) {
	foreach ( array_keys( $this->before_widget_tags_seen ) as $tag_name ) {
		if ( ! isset( $allowed_html[ $tag_name ] ) ) {
			$allowed_html[ $tag_name ] = array();
		}
		$allowed_html[ $tag_name ] = array_merge(
			$allowed_html[ $tag_name ],
			array_fill_keys(
				array(
					'data-customize-partial-id',
					'data-customize-partial-type',
					'data-customize-partial-placement-context',
					'data-customize-partial-widget-id',
					'data-customize-partial-options',
				),
				true
			)
		);
	}
	return $allowed_html;
}