wp_is_post_autosave

Advertisement

Summery Summery

Determines if the specified post is an autosave.

Syntax Syntax

wp_is_post_autosave( int|WP_Post $post )

Parameters Parameters

$post

(Required) Post ID or post object.

Return Return

(int|false) ID of autosave's parent on success, false if not a revision.

Source Source

File: wp-includes/revision.php

		return false;
	}

	return (int) $post->post_parent;
}

/**
 * Determines if the specified post is an autosave.
 *
 * @since 2.6.0
 *
 * @param int|WP_Post $post Post ID or post object.

Advertisement

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Advertisement

Leave a Reply