Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#56900 closed defect (bug) (fixed)

WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles call to WP_Query incorrect.

Reported by: peterwilsoncc Owned by: peterwilsoncc
Priority: normal Milestone: 6.1.1
Component: Themes Version: 6.1
Severity: minor Keywords: has-patch commit fixed-major
Cc: Focuses: performance

Description

WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles includes a call to WP_Query which is ordered by post_date.

The correct value is date.

As WP_Query orders by date by default, this is a minor bug as it doesn't have any affect on the database query generated. If needs be, it can probably wait until 6.1.1.

Introduced in [54186].

Attachments (1)

56900.diff (635 bytes ) - added by miguelaxcar 4 years ago.
diff against origin/6.1 branch

Download all attachments as: .zip

Change History (12)

@miguelaxcar
4 years ago

diff against origin/6.1 branch

#1 @johnbillion
4 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone Awaiting Review6.1.1

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


4 years ago

#3 @JeffPaul
4 years ago

  • Keywords needs-testing added

#4 @spacedmonkey
4 years ago

  • Keywords commit added

Patch looks good. Adding keyword commit.

#5 @spacedmonkey
4 years ago

  • Focuses performance added

#6 @mxbclang
4 years ago

  • Owner set to peterwilsoncc
  • Status newassigned

#7 @mxbclang
4 years ago

@peterwilsoncc Assigning over to you for commit, thank you!

#8 @mukesh27
4 years ago

  • Keywords needs-testing removed

@peterwilsoncc patch 56900.diff LGTM.

#9 @peterwilsoncc
4 years ago

  • Resolutionfixed
  • Status assignedclosed

In 54770:

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.

#10 @peterwilsoncc
4 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closedreopened

Reopening for merging in to the 6.1 branch

#11 @desrosj
4 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 54779:

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.
Merges [54770] to the 6.1 branch.
Fixes #56900.

Note: See TracTickets for help on using tickets.