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

(int|WP_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

This site uses Akismet to reduce spam. Learn how your comment data is processed.