wp_kses_allowed_html

wp_kses_allowed_html

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('wp_kses_allowed_html') is found 7 times:

  • /wp-includes/kses.php line 869
    		 *
    		 * @param array[] $html    Allowed HTML tags.
    		 * @param string  $context Context name.
    		 */
    		return apply_filters( 'wp_kses_allowed_html', $html, $context );
    	}
    
    	switch ( $context ) {
    		case 'post':
    			/** This filter is documented in wp-includes/kses.php */
    			$tags = apply_filters( 'wp_kses_allowed_html', $allowedposttags, $context );
    
  • /wp-includes/kses.php line 875
     
    	switch ( $context ) {
    		case 'post':
    			/** This filter is documented in wp-includes/kses.php */
    			$tags = apply_filters( 'wp_kses_allowed_html', $allowedposttags, $context );
    
    			// 5.0.1 removed the `<form>` tag, allow it if a filter is allowing it's sub-elements `<input>` or `<select>`.
    			if ( ! CUSTOM_TAGS && ! isset( $tags['form'] ) && ( isset( $tags['input'] ) || isset( $tags['select'] ) ) ) {
    				$tags = $allowedposttags;
    
    				$tags['form'] = array(
    
  • /wp-includes/kses.php line 892
    					'target'         => true,
    				);
    
    				/** This filter is documented in wp-includes/kses.php */
    				$tags = apply_filters( 'wp_kses_allowed_html', $tags, $context );
    			}
    
    			return $tags;
    
    		case 'user_description':
    		case 'pre_user_description':
    
  • /wp-includes/kses.php line 902
    		case 'pre_user_description':
    			$tags             = $allowedtags;
    			$tags['a']['rel'] = true;
    			/** This filter is documented in wp-includes/kses.php */
    			return apply_filters( 'wp_kses_allowed_html', $tags, $context );
    
    		case 'strip':
    			/** This filter is documented in wp-includes/kses.php */
    			return apply_filters( 'wp_kses_allowed_html', array(), $context );
    
    		case 'entities':
    
  • /wp-includes/kses.php line 906
    			return apply_filters( 'wp_kses_allowed_html', $tags, $context );
    
    		case 'strip':
    			/** This filter is documented in wp-includes/kses.php */
    			return apply_filters( 'wp_kses_allowed_html', array(), $context );
    
    		case 'entities':
    			/** This filter is documented in wp-includes/kses.php */
    			return apply_filters( 'wp_kses_allowed_html', $allowedentitynames, $context );
    
    		case 'data':
    
  • /wp-includes/kses.php line 910
    			return apply_filters( 'wp_kses_allowed_html', array(), $context );
    
    		case 'entities':
    			/** This filter is documented in wp-includes/kses.php */
    			return apply_filters( 'wp_kses_allowed_html', $allowedentitynames, $context );
    
    		case 'data':
    		default:
    			/** This filter is documented in wp-includes/kses.php */
    			return apply_filters( 'wp_kses_allowed_html', $allowedtags, $context );
    	}
    
  • /wp-includes/kses.php line 915
     
    		case 'data':
    		default:
    			/** This filter is documented in wp-includes/kses.php */
    			return apply_filters( 'wp_kses_allowed_html', $allowedtags, $context );
    	}
    }
    
    /**
     * You add any KSES hooks here.
     *
    

See this hook used in plugins: