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