wp_kses_allowed_html

The WordPress Core wp kses allowed html hook.

Description

add_filter( 'wp_kses_allowed_html', (callback) $array ); 

Parameters (1)

0. $array (callback) => array( $this, 'filter_wp_kses_allowed_data_attributes' )
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'wp_kses_allowed_html', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wp_kses_allowed_html callback 
  2. function filter_wp_kses_allowed_html( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wp_kses_allowed_html', 'filter_wp_kses_allowed_html', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wp_kses_allowed_html', 'filter_wp_kses_allowed_html', 10, 1 ); 

Defined (7)

The filter is defined in the following location(s).

/wp-includes/class-wp-customize-widgets.php  
  1. add_filter( 'wp_kses_allowed_html', array( $this, 'filter_wp_kses_allowed_data_attributes' ) ); 
/wp-includes/kses.php  
  1. return apply_filters( 'wp_kses_allowed_html', $context, 'explicit' ); 
  1. return apply_filters( 'wp_kses_allowed_html', $allowedposttags, $context ); 
  1. return apply_filters( 'wp_kses_allowed_html', $tags, $context ); 
  1. return apply_filters( 'wp_kses_allowed_html', array(), $context ); 
  1. return apply_filters( 'wp_kses_allowed_html', $allowedentitynames, $context); 
  1. return apply_filters( 'wp_kses_allowed_html', $allowedtags, $context );