wp_get_post_revisions always empty
-
Here’s an example code for a plugin I’m working on:
if ( !empty( $_POST['save'] )) { // If the current number of revisions <= the maximum allowed revisions (3) if ( count( wp_get_post_revisions( $post_ID )) <= WP_POST_REVISIONS ) { // Save post revision wp_save_post_revision( $post_ID ); } }
The problem is
wp_get_post_revisions
always returns an empty array, and I don’t know why. I setWP_POST_REVISIONS
to 3 in wp-config.php.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘wp_get_post_revisions always empty’ is closed to new replies.