WordPress.org

Make WordPress Core

Opened 18 months ago

Last modified 16 months ago

#36314 new enhancement

If orderby undefined, alter get_posts to defer to WP_Query's default

Reported by: peterwilsoncc Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: needs-patch needs-unit-tests
Focuses: template Cc:

Description

If the argument is undefined, defer get_posts orderby & order to that of WP_Query's.

For search strings, this will order posts by relevance. In other cases it will have no effect.

Change History (2)

#1 @peterwilsoncc
18 months ago

  • Summary changed from If orderby undefined, get_posts should defer to WP_Query's default to If orderby undefined, alter get_posts to defer to WP_Query's default

#2 @peterwilsoncc
16 months ago

  • Keywords needs-patch needs-unit-tests added
Note: See TracTickets for help on using tickets.