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



wp_is_post_revision › WordPress Function

Since2.6.0
已弃用n/a
wp_is_post_revision ( $post )
参数:
  • (int|WP_Post) $post Post ID or post object.
    Required: Yes
返回:
  • (int|false) ID of revision's parent on success, false if not a revision.
定义在:
文档:

Determines if the specified post is a revision.



源码

function wp_is_post_revision( $post ) {
	$post = wp_get_post_revision( $post );

	if ( ! $post ) {
		return false;
	}

	return (int) $post->post_parent;
}