Skip to content

Commit 6903cfd

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54770 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b8bf297 commit 6903cfd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/class-wp-theme-json-resolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ public static function get_user_data_from_wp_global_styles( $theme, $create_post
408408
$stylesheet = $theme->get_stylesheet();
409409
$args = array(
410410
'posts_per_page' => 1,
411-
'orderby' => 'post_date',
411+
'orderby' => 'date',
412412
'order' => 'desc',
413413
'post_type' => $post_type_filter,
414414
'post_status' => $post_status_filter,

0 commit comments

Comments
 (0)