content_save_pre

The WordPress Core content save pre hook.

Description

apply_filters( 'content_save_pre', (unknown) $wp_slash ); 

Parameters (1)

0. $wp_slash (unknown) => wp_slash( $menu_item_value['description'] )
The wp slash.

Usage

To run the hook, copy the example below.
  1. $wp_slash = apply_filters( 'content_save_pre', $wp_slash ); 
  2.  
  3. if ( !empty( $wp_slash ) ) { 
  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_slash ) { 
  3. // make filter magic happen here... 
  4. return $wp_slash
  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 (1)

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

/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php  
  1. $menu_item_value['description'] = wp_unslash( apply_filters( 'content_save_pre', wp_slash( $menu_item_value['description'] ) ) );