From dbf0e1bf9e4b5632faff61d87ed5d0ed45a8e2bd Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Thu, 8 Jun 2023 10:02:24 +0000 Subject: [PATCH] Query: Allow queries by `wp_dashboard_recent_posts()` to be cached. Set the `cache_results` argument to `true` for `WP_Query` to ensure the posts queries on the dashboard can also be cached. Props benjgrolleau. Fixes #57055. Built from https://develop.svn.wordpress.org/trunk@55895 git-svn-id: http://core.svn.wordpress.org/trunk@55407 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index df1cfa1881..525e51f0cf 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -982,7 +982,7 @@ function wp_dashboard_recent_posts( $args ) { 'order' => $args['order'], 'posts_per_page' => (int) $args['max'], 'no_found_rows' => true, - 'cache_results' => false, + 'cache_results' => true, 'perm' => ( 'future' === $args['status'] ) ? 'editable' : 'readable', ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 2fd9094166..4879be96d9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55894'; +$wp_version = '6.3-alpha-55895'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.