- Timestamp:
- 10/21/2025 03:31:55 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php
r59970 r61002 309 309 310 310 if ( $total_revisions < 1 ) { 311 // Out-of-bounds, run the query again without LIMIT fortotal count.311 // Out-of-bounds, run the query without pagination/offset to get the total count. 312 312 unset( $query_args['paged'], $query_args['offset'] ); 313 313 314 $count_query = new WP_Query(); 314 $count_query = new WP_Query(); 315 $query_args['fields'] = 'ids'; 316 $query_args['posts_per_page'] = 1; 317 $query_args['update_post_meta_cache'] = false; 318 $query_args['update_post_term_cache'] = false; 319 315 320 $count_query->query( $query_args ); 316 317 321 $total_revisions = $count_query->found_posts; 318 322 }
Note: See TracChangeset
for help on using the changeset viewer.