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.
This hook occurs 6 times in this file.
Line | Code |
---|---|
493 | * |
494 | * @param string $context The context for which to retrieve tags. Allowed values are |
495 | * post | strip | data | entities or the name of a field filter such as pre_user_description. |
496 | * @return array List of allowed tags and their allowed attributes. |
497 | */ |
498 | function wp_kses_allowed_html( $context = '' ) { |
499 | global $allowedposttags, $allowedtags, $allowedentitynames; |
500 |
|
501 | if ( is_array( $context ) ) |
502 | return apply_filters( 'wp_kses_allowed_html', $context, 'explicit' ); |
503 |
|
504 | switch ( $context ) { |
505 | case 'post': |
506 | return apply_filters( 'wp_kses_allowed_html', $allowedposttags, $context ); |
507 | break; |
508 | case 'user_description': |
509 | case 'pre_user_description': |
510 | $tags = $allowedtags; |
511 | $tags['a']['rel'] = true; |
512 | return apply_filters( 'wp_kses_allowed_html', $tags, $context ); |
513 | break; |
514 | case 'strip': |
515 | return apply_filters( 'wp_kses_allowed_html', array(), $context ); |
516 | break; |
517 | case 'entities': |
518 | return apply_filters( 'wp_kses_allowed_html', $allowedentitynames, $context); |
519 | break; |
520 | case 'data': |
521 | default: |
522 | return apply_filters( 'wp_kses_allowed_html', $allowedtags, $context ); |
523 | } |
524 | } |
525 |
|
526 | /** |
527 | * You add any kses hooks here. |
528 | * |
529 | * There is currently only one kses WordPress hook and it is called here. All |
530 | * parameters are passed to the hooks and expected to receive a string. |
531 | * |