wp_revisions_enabled( WP_Post $post ): bool

In this article

Determines whether revisions are enabled for a given post.

Parameters

$postWP_Postrequired
The post object.

Return

bool True if number of revisions to keep isn’t zero, false otherwise.

Source

function wp_revisions_enabled( $post ) {
	return wp_revisions_to_keep( $post ) !== 0;
}

Changelog

VersionDescription
3.6.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.