W3cubDocs

/WordPress

wp_revisions_enabled( WP_Post $post )

Determine if revisions are enabled for a given post.

Parameters

$post

(WP_Post) (Required) The post object.

Return

(bool) True if number of revisions to keep isn't zero, false otherwise.

Source

File: wp-includes/revision.php

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

Changelog

Version Description
3.6.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_revisions_enabled