post_type, 'revisions' ) ) { return $num; } // Bail early if not previewing post. if ( ! is_preview() || empty( $_GET['preview_id'] ) ) { return $num; } $preview_id = (int) $_GET['preview_id']; // Bail early if not previewing this post. if ( $preview_id !== $post->ID ) { return $num; } // Bail early if not currently filtering the post ID // for ACF to fetch from its latest revision. if ( ! doing_filter( 'wp_revisions_to_keep' ) || ! doing_filter( 'acf/validate_post_id' ) ) { return $num; } return 1; }, 10, 2 );