wp_revisions_enabled

Determine if revisions are enabled for a given post.

Description

wp_revisions_enabled( (WP_Post) $post ); 

Parameters (1)

0. $post (WP_Post)
The post object.

Usage

  1. if ( !function_exists( 'wp_revisions_enabled' ) ) { 
  2. require_once ABSPATH . WPINC . '/revision.php'; 
  3.  
  4. // The post object. 
  5. $post = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_revisions_enabled($post); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/revision.php  
  1. function wp_revisions_enabled( $post ) { 
  2. return wp_revisions_to_keep( $post ) !== 0;