wp_kses_hook( string $string, array $allowed_html, array $allowed_protocols )

You add any kses hooks here.


Description Description

There is currently only one kses WordPress hook, ‘pre_kses’, and it is called here. All parameters are passed to the hooks and expected to receive a string.


Parameters Parameters

$string

(string) (Required) Content to filter through kses

$allowed_html

(array) (Required) List of allowed HTML elements

$allowed_protocols

(array) (Required) Allowed protocol in links


Top ↑

Return Return

(string) Filtered content through 'pre_kses' hook.


Top ↑

Source Source

File: wp-includes/kses.php

function wp_kses_hook( $string, $allowed_html, $allowed_protocols ) {
	/**
	 * Filters content to be run through kses.
	 *
	 * @since 2.3.0
	 *
	 * @param string $string            Content to run through kses.
	 * @param array  $allowed_html      Allowed HTML elements.
	 * @param array  $allowed_protocols Allowed protocol in links.
	 */
	return apply_filters( 'pre_kses', $string, $allowed_html, $allowed_protocols );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.