pre_untrash_post хук-фильтр . WP 4.9.0
Filters whether a post untrashing should take place.
Использование
add_filter( 'pre_untrash_post', 'filter_function_name_2410', 10, 2 ); function filter_function_name_2410( $untrash, $post ){ // filter... return $untrash; }
- $untrash(true/false/null)
- Whether to go forward with untrashing.
- $post(WP_Post)
- Post object.
Список изменений
С версии 4.9.0 | Введена. |
Где вызывается хук
wp-includes/post.php 3198
$check = apply_filters( 'pre_untrash_post', null, $post );