untrash_post хук-событие . WP 2.9.0
Fires before a post is restored from the Trash.
Использование
add_action( 'untrash_post', 'action_function_name_3206', 10, 2 ); function action_function_name_3206( $post_id, $previous_status ){ // action... }
- $post_id(число)
- Post ID.
- $previous_status(строка)
- The status of the post at the point where it was trashed.
Список изменений
С версии 2.9.0 | Введена. |
С версии 5.6.0 | The $previous_status parameter was added. |
Где вызывается хук
wp-includes/post.php 3293
do_action( 'untrash_post', $post_id, $previous_status );