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:
parent
1031b96997
commit
dbf0e1bf9e
|
@ -982,7 +982,7 @@ function wp_dashboard_recent_posts( $args ) {
|
||||||
'order' => $args['order'],
|
'order' => $args['order'],
|
||||||
'posts_per_page' => (int) $args['max'],
|
'posts_per_page' => (int) $args['max'],
|
||||||
'no_found_rows' => true,
|
'no_found_rows' => true,
|
||||||
'cache_results' => false,
|
'cache_results' => true,
|
||||||
'perm' => ( 'future' === $args['status'] ) ? 'editable' : 'readable',
|
'perm' => ( 'future' === $args['status'] ) ? 'editable' : 'readable',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue