(field)_pre
Filters the value of a specific post field before saving.
The dynamic portion of the hook name, $field, refers to the post field name.
Использование
add_filter( '(field)_pre', 'wp_kama_field_pre_filter' ); /** * Function for `(field)_pre` filter-hook. * * @param mixed $value Value of the post field. * * @return mixed */ function wp_kama_field_pre_filter( $value ){ // filter... return $value; }
- $value(разное)
- Value of the post field.
Список изменений
С версии 2.3.0 | Введена. |
Где вызывается хук
(field)_pre
wp-includes/post.php 2952
$value = apply_filters( "{$field}_pre", $value );