Filters the number of revisions to save for the given post.
Description
Overrides the value of WP_POST_REVISIONS.
Parameters
$num
int- Number of revisions to store.
$post
WP_Post- Post object.
Source
$num = apply_filters( 'wp_revisions_to_keep', $num, $post );
Changelog
Version | Description |
---|---|
3.6.0 | Introduced. |
Example migrated from Codex:
The example below sets the number of revisions for a theoretical post type ‘my_custom_post’.