Make WordPress Core

Changeset 55895


Ignore:
Timestamp:
06/08/2023 10:00:07 AM (14 months ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r55574 r55895  
    983983        'posts_per_page' => (int) $args['max'],
    984984        'no_found_rows'  => true,
    985         'cache_results'  => false,
     985        'cache_results'  => true,
    986986        'perm'           => ( 'future' === $args['status'] ) ? 'editable' : 'readable',
    987987    );
Note: See TracChangeset for help on using the changeset viewer.