ACF_Internal_Post_Type::untrash_post_status
Returns the previous post_status instead of "draft" for the ACF internal post types. Prior to WordPress 5.6.0, this filter was not needed as restored posts were always assigned their original status.
Метод класса: ACF_Internal_Post_Type{}
Хуков нет.
Возвращает
Строку.
Использование
$ACF_Internal_Post_Type = new ACF_Internal_Post_Type(); $ACF_Internal_Post_Type->untrash_post_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.
Список изменений
| С версии 6.1 | Введена. |
Код ACF_Internal_Post_Type::untrash_post_status() ACF Internal Post Type::untrash post status ACF 6.4.2
public function untrash_post_status( $new_status, $post_id, $previous_status ) {
return ( get_post_type( $post_id ) === $this->post_type ) ? $previous_status : $new_status;
}