wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_untrash_post_set_previous_status › WordPress Function

Since5.6.0
已弃用n/a
wp_untrash_post_set_previous_status ( $new_status, $post_id, $previous_status )
参数: (3)
  • (string) $new_status The new status of the post being restored.
    Required: Yes
  • (int) $post_id The ID of the post being restored.
    Required: Yes
  • (string) $previous_status The status of the post at the point where it was trashed.
    Required: Yes
返回:
  • (string) The new status of the post.
定义在:
文档:

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 filter.


源码

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