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
This commit is contained in:
Dominik Schilling 2023-06-08 10:02:24 +00:00
parent 1031b96997
commit dbf0e1bf9e
2 changed files with 2 additions and 2 deletions

View File

@ -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',
);

View File

@ -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.