wp_revisions_enabled() WordPress Function

This function enables the revision feature for the post type. By default, this is turned on for all post types except for pages. Revisions are useful for keeping track of changes to a post over time.

wp_revisions_enabled( WP_Post $post ) #

Determine if revisions are enabled for a given post.


Parameters

$post

(WP_Post)(Required)The post object.


Top ↑

Return

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


Top ↑

Source

File: wp-includes/revision.php

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


Top ↑

Changelog

Changelog
VersionDescription
3.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.