content_filtered_save_pre хук-фильтрWP 2.3.0

Filters the value of a specific field before saving.

Only applied to post fields with a name which is prefixed with post_.

Это один из вариантов динамического хука (field_no_prefix)_save_pre

Использование

add_filter( 'content_filtered_save_pre', 'wp_kama_content_filtered_save_pre_filter' );

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

	// filter...
	return $value;
}
$value(разное)
Value of the post field.

Список изменений

С версии 2.3.0 Введена.

Где вызывается хук

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

Где используется хук в WordPress

wp-includes/kses.php 2288
add_filter( 'content_filtered_save_pre', 'wp_filter_global_styles_post', 9 );
wp-includes/kses.php 2293
add_filter( 'content_filtered_save_pre', 'wp_filter_post_kses' );
wp-includes/kses.php 2318
remove_filter( 'content_filtered_save_pre', 'wp_filter_global_styles_post', 9 );
wp-includes/kses.php 2323
remove_filter( 'content_filtered_save_pre', 'wp_filter_post_kses' );