mirror of
git://develop.git.wordpress.org/
synced 2025-04-05 04:33:18 +02:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55895 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
624a6c4990
commit
7d503a499f
@ -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',
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user