wphooks.info - wp_revisions_to_keep

wp_revisions_to_keep

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/revision.php:
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
	/**
	 * Filters the number of revisions to save for the given post.
	 *
	 * Overrides the value of WP_POST_REVISIONS.
	 *
	 * @since 3.6.0
	 *
	 * @param int     $num  Number of revisions to store.
	 * @param WP_Post $post Post object.
	 */
	return (int) apply_filters( 'wp_revisions_to_keep', $num, $post );
}

/**
 * Sets up the post object for preview based on the post autosave.
 *
 * @since 2.7.0
 * @access private
 *
 * @param WP_Post $post