WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
494 | * |
495 | * @since 1.0.0 |
496 | * |
497 | * @param string $string Content to filter through kses |
498 | * @param array $allowed_html List of allowed HTML elements |
499 | * @param array $allowed_protocols Optional. Allowed protocol in links. |
500 | * @return string Filtered content with only allowed HTML elements |
501 | */ |
502 | function wp_kses($string, $allowed_html, $allowed_protocols = array ()) { |
503 | $allowed_protocols = wp_parse_args( $allowed_protocols, apply_filters('kses_allowed_protocols', array ('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn') )); |
504 | $string = wp_kses_no_null($string); |
505 | $string = wp_kses_js_entities($string); |
506 | $string = wp_kses_normalize_entities($string); |
507 | $allowed_html_fixed = wp_kses_array_lc($allowed_html); |
508 | $string = wp_kses_hook($string, $allowed_html_fixed, $allowed_protocols); // WP changed the order of these funcs and added args to wp_kses_hook |
509 | return wp_kses_split($string, $allowed_html_fixed, $allowed_protocols); |
510 | } |
511 |
|
512 | /** |