Skip to content

Commit

Permalink
Themes: Improve WP_Query call getting global styles.
Browse files Browse the repository at this point in the history
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.


Built from https://develop.svn.wordpress.org/trunk@54770


git-svn-id: http://core.svn.wordpress.org/trunk@54322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
peterwilsoncc committed Nov 9, 2022
1 parent 5f61131 commit 330c35b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wp-includes/class-wp-theme-json-resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public static function get_user_data_from_wp_global_styles( $theme, $create_post
$stylesheet = $theme->get_stylesheet();
$args = array(
'posts_per_page' => 1,
'orderby' => 'post_date',
'orderby' => 'date',
'order' => 'desc',
'post_type' => $post_type_filter,
'post_status' => $post_status_filter,
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-54769';
$wp_version = '6.2-alpha-54770';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 330c35b

Please sign in to comment.