Skip to content

Commit

Permalink
wp_dashboard_recent_posts lazy load post meta.
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey committed Dec 4, 2024
1 parent 59a3aee commit a6b8d34
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/wp-admin/includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -976,14 +976,15 @@ function wp_dashboard_site_activity() {
*/
function wp_dashboard_recent_posts( $args ) {
$query_args = array(
'post_type' => 'post',
'post_status' => $args['status'],
'orderby' => 'date',
'order' => $args['order'],
'posts_per_page' => (int) $args['max'],
'no_found_rows' => true,
'cache_results' => true,
'perm' => ( 'future' === $args['status'] ) ? 'editable' : 'readable',
'post_type' => 'post',
'post_status' => $args['status'],
'orderby' => 'date',
'order' => $args['order'],
'posts_per_page' => (int) $args['max'],
'no_found_rows' => true,
'cache_results' => true,
'lazy_load_post_meta' => true,
'perm' => ( 'future' === $args['status'] ) ? 'editable' : 'readable',
);

/**
Expand Down

0 comments on commit a6b8d34

Please sign in to comment.