(field_no_prefix)_save_pre filter-hookWP 2.3.0

Filters the value of a specific field before saving.

The dynamic portion of the hook name, $field_no_prefix, refers to the post field name.

Usage

add_filter( '(field_no_prefix)_save_pre', 'wp_kama_field_no_prefix_save_pre_filter' );

/**
 * Function for `(field_no_prefix)_save_pre` filter-hook.
 * 
 * @param mixed $value Value of the post field.
 *
 * @return mixed
 */
function wp_kama_field_no_prefix_save_pre_filter( $value ){

	// filter...
	return $value;
}
$value(mixed)
Value of the post field.

Changelog

Since 2.3.0 Introduced.

Where the hook is called

sanitize_post_field()
(field_no_prefix)_save_pre
wp-includes/post.php 2828
$value = apply_filters( "{$field_no_prefix}_save_pre", $value );

Where the hook is used in WordPress

wp-includes/default-filters.php 303
add_filter( 'title_save_pre', 'trim' );
wp-includes/kses.php 2151
add_filter( 'title_save_pre', 'wp_filter_kses' );
wp-includes/kses.php 2161
add_filter( 'content_save_pre', 'wp_filter_global_styles_post', 9 );
wp-includes/kses.php 2162
add_filter( 'content_filtered_save_pre', 'wp_filter_global_styles_post', 9 );
wp-includes/kses.php 2165
add_filter( 'content_save_pre', 'wp_filter_post_kses' );
wp-includes/kses.php 2166
add_filter( 'excerpt_save_pre', 'wp_filter_post_kses' );
wp-includes/kses.php 2167
add_filter( 'content_filtered_save_pre', 'wp_filter_post_kses' );
wp-includes/kses.php 2184
remove_filter( 'title_save_pre', 'wp_filter_kses' );
wp-includes/kses.php 2191
remove_filter( 'content_save_pre', 'wp_filter_global_styles_post', 9 );
wp-includes/kses.php 2192
remove_filter( 'content_filtered_save_pre', 'wp_filter_global_styles_post', 9 );
wp-includes/kses.php 2195
remove_filter( 'content_save_pre', 'wp_filter_post_kses' );
wp-includes/kses.php 2196
remove_filter( 'excerpt_save_pre', 'wp_filter_post_kses' );
wp-includes/kses.php 2197
remove_filter( 'content_filtered_save_pre', 'wp_filter_post_kses' );