Make WordPress Core


Ignore:
Timestamp:
11/09/2022 12:38:14 AM (2 years ago)
Author:
peterwilsoncc
Message:

Themes: Improve WP_Query call getting global styles.

Change orderby clause used within WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles to date to match the WP_Query documentation for the parameter.

Props miguelaxcar, johnbillion, JeffPaul, spacedmonkey, mxbclang, mukesh27.
Fixes #56900.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json-resolver.php

    r54706 r54770  
    409409        $args             = array(
    410410            'posts_per_page'      => 1,
    411             'orderby'             => 'post_date',
     411            'orderby'             => 'date',
    412412            'order'               => 'desc',
    413413            'post_type'           => $post_type_filter,
Note: See TracChangeset for help on using the changeset viewer.