Make WordPress Core

Opened 9 years ago

Last modified 6 years ago

#36314 new enhancement

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

Reported by: peterwilsoncc's profile peterwilsoncc Owned by:
Milestone: 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
9 years 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
9 years ago

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