On this page
apply_filters( 'wp_revisions_to_keep', int $num, WP_Post $post )
Filters the number of revisions to save for the given post.
Description
Overrides the value of WP_POST_REVISIONS.
Parameters
$numint-
Number of revisions to store.
$postWP_Post-
Post object.
More Information
- By default, an infinite number of revisions are stored if a post type supports revisions.
- Note that the filter callback functions must return a value after it is finished processing or the revisions will be empty.
Source
File: wp-includes/revision.php. View all references
$num = apply_filters( 'wp_revisions_to_keep', $num, $post );
Related
Used By
| Used By | Description |
|---|---|
| wp_revisions_to_keep() wp-includes/revision.php | Determines how many revisions to retain for a given post. |
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_revisions_to_keep