excerpt_save_pre
The WordPress Core excerpt save pre hook.
Description
Parameters (1)
- 0. $wp_slash (unknown) =>
wp_slash( $menu_item_value['attr_title'] )
- The
wp
slash.
Usage
- To run the hook, copy the example below.
- $wp_slash = apply_filters( 'excerpt_save_pre', $wp_slash );
- if ( !empty( $wp_slash ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the excerpt_save_pre callback
- function filter_excerpt_save_pre( $wp_slash ) {
- // make filter magic happen here...
- return $wp_slash;
- };
- // add the filter
- add_filter( 'excerpt_save_pre', 'filter_excerpt_save_pre', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'excerpt_save_pre', 'filter_excerpt_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
- $menu_item_value['attr_title'] = wp_unslash( apply_filters( 'excerpt_save_pre', wp_slash( $menu_item_value['attr_title'] ) ) );