wp_untrash_post_set_previous_status()WP 5.6.0

Filters callback which sets the status of an untrashed post to its previous status.

This can be used as a callback on the wp_untrash_post_status

Хуков нет.

Возвращает

Строку. The new status of the post.

Использование

wp_untrash_post_set_previous_status( $new_status, $post_id, $previous_status );
$new_status(строка) (обязательный)
The new status of the post being restored.
$post_id(int) (обязательный)
The ID of the post being restored.
$previous_status(строка) (обязательный)
The status of the post at the point where it was trashed.

Список изменений

С версии 5.6.0 Введена.

Код wp_untrash_post_set_previous_status() WP 6.4.3

function wp_untrash_post_set_previous_status( $new_status, $post_id, $previous_status ) {
	return $previous_status;
}