WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Function Reference/wp revisions to keep"

m (Return)
Line 1: Line 1:
 
==Description==
 
==Description==
  +
Determine how many revisions to retain for a given post. By default, an infinite number of revisions are stored if a post type supports revisions.
   
 
==Parameters==
 
==Parameters==
{{Parameter|$var|TYPE|Description.}}
+
{{Parameter|$post|object|The Post object.}}
{{Parameter|$var|TYPE|Description.|optional|DEFAULT}}
 
   
 
== Return ==
 
== Return ==
{{Return||TYPE|Description.}}
+
{{Return||int|The number of revisions to keep.}}
   
 
== Usage ==
 
== Usage ==
Line 21: Line 22:
 
== Source File ==
 
== Source File ==
 
<!-- Need links to current source code files -->
 
<!-- Need links to current source code files -->
<tt>wp_revisions_to_keep()</tt> is located in {{Trac|wp-whatever/file.php}}.
+
<tt>wp_revisions_to_keep()</tt> is located in {{Trac|wp-includes/revision.php}}.
   
 
==Related==
 
==Related==
Line 29: Line 30:
   
 
{{Copyedit}}
 
{{Copyedit}}
  +
{{Stub}}

Revision as of 17:26, 6 August 2013

Description

Determine how many revisions to retain for a given post. By default, an infinite number of revisions are stored if a post type supports revisions.

Parameters

$post
(object) (required) The Post object.
Default: None

Return

(int) 
The number of revisions to keep.

Usage

 <?php  ?> 

Example

Description text

Example code

Change Log

Source File

wp_revisions_to_keep() is located in wp-includes/revision.php.

Related

Function ref links

This article is marked as in need of editing. You can help Codex by editing it.
This page is marked as incomplete. You can help Codex by expanding it.