of_sanitize_editor

Sanitization for editor input.

Description

of_sanitize_editor( (string) $input ); 

Returns unfiltered HTML if user has permissions.

Parameters (1)

0. $input (string)
The input.

Usage

  1. if ( !function_exists( 'of_sanitize_editor' ) ) { 
  2. require_once '/inc/includes/class-options-sanitize.php'; 
  3.  
  4. // The input. 
  5. $input = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = of_sanitize_editor($input); 
  9.  

Defined (1)

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

/inc/includes/class-options-sanitize.php  
  1. function of_sanitize_editor( $input ) { 
  2. if ( current_user_can( 'unfiltered_html' ) ) { 
  3. $output = $input; 
  4. else { 
  5. global $allowedposttags; 
  6. $output = wpautop( wp_kses( $input, $allowedposttags ) ); 
  7. return $output;