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.
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; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.6.0 | Introduced. |