Make WordPress Core

#56900 closed defect (bug) (fixed)

WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles call to WP_Query incorrect.

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

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 18 months ago.
diff against origin/6.1 branch

Download all attachments as: .zip

Change History (12)

@miguelaxcar
18 months ago

diff against origin/6.1 branch

#1 @johnbillion
18 months ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 6.1.1

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


18 months ago

#3 @JeffPaul
18 months ago

  • Keywords needs-testing added

#4 @spacedmonkey
18 months ago

  • Keywords commit added

Patch looks good. Adding keyword commit.

#5 @spacedmonkey
18 months ago

  • Focuses performance added

#6 @mxbclang
18 months ago

  • Owner set to peterwilsoncc
  • Status changed from new to assigned

#7 @mxbclang
18 months ago

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

#8 @mukesh27
18 months ago

  • Keywords needs-testing removed

@peterwilsoncc patch 56900.diff LGTM.

#9 @peterwilsoncc
18 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

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
18 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for merging in to the 6.1 branch

#11 @desrosj
18 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

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.