wordpress / latest / functions / wp_revisions_enabled.html

wp_revisions_enabled( WP_Post $post ): bool

Determines whether 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. View all references

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

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
3.6.0 Introduced.

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