content_save_pre

The WordPress Core content save pre hook.

Description

remove_filter( 'content_save_pre', (string) $wp_filter_post_kses ); 

Parameters (1)

0. $wp_filter_post_kses (string) => 'wp_filter_post_kses'
The wp filter post kses.

Usage

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

Defined (8)

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

/modules/custom-css/custom-css.php  
  1. remove_filter( 'content_save_pre', 'wp_filter_post_kses' ); 
  1. remove_filter( 'content_save_pre', 'wp_filter_post_kses' ); 
/modules/markdown/easy-markdown.php  
  1. add_filter( 'content_save_pre', array( $this, 'preserve_code_blocks' ), 1 ); 
  1. remove_filter( 'content_save_pre', array( $this, 'preserve_code_blocks' ), 1 ); 
  1. add_filter( 'content_save_pre', array( $this, 'o2_escape_lists' ), 1 ); 
  1. $this->kses = remove_filter( 'content_filtered_save_pre', 'wp_filter_post_kses' ) && remove_filter( 'content_save_pre', 'wp_filter_post_kses' ); 
  1. $post_data['post_content'] = apply_filters( 'content_save_pre', $post_data['post_content'] ); 
  1. $post_data['post_content'] = apply_filters( 'content_save_pre', $post_data['post_content'] );