pinged_pre
Filters the value of a specific post field before saving.
Only applied to post fields with a name which is not prefixed with post_.
- ID_pre
- comment_status_pre
- ping_status_pre
- to_ping_pre
- pinged_pre
- guid_pre
- menu_order_pre
- comment_count_pre
Это один из вариантов динамического хука (field)_pre
Использование
add_filter( 'pinged_pre', 'wp_kama_pinged_pre_filter' ); /** * Function for `pinged_pre` filter-hook. * * @param mixed $value Value of the post field. * * @return mixed */ function wp_kama_pinged_pre_filter( $value ){ // filter... return $value; }
- $value(разное)
- Value of the post field.
Список изменений
С версии 2.3.0 | Введена. |
Где вызывается хук
pinged_pre
wp-includes/post.php 3098
$value = apply_filters( "{$field}_pre", $value );