WordPress at a glance
filter is not described

pre_kses filter-hook . WP 2.3.0

Filters content to be run through KSES.


add_filter( 'pre_kses', 'filter_function_name_5491', 10, 3 );
function filter_function_name_5491( $string, $allowed_html, $allowed_protocols ){
	// filter...

	return $string;
Content to filter through KSES.
An array of allowed HTML elements and attributes, or a context name such as 'post'. See wp_kses_allowed_html() for the list of accepted context names.
Array of allowed URL protocols.

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

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

Где вызывается хук

wp-includes/kses.php 935
return apply_filters( 'pre_kses', $string, $allowed_html, $allowed_protocols );

Где используется хук в ядре WP

wp-includes/default-filters.php 247
add_filter( 'pre_kses', 'wp_pre_kses_less_than' );
wp-includes/default-filters.php 248
add_filter( 'pre_kses', 'wp_pre_kses_block_attributes', 10, 3 );
wp-includes/formatting.php 4998
remove_filter( 'pre_kses', 'wp_pre_kses_block_attributes', 10 );
wp-includes/formatting.php 5000
add_filter( 'pre_kses', 'wp_pre_kses_block_attributes', 10, 3 );