Don't order feeds of search results by relevance.

Allow for orderby=relevance to explicitly request relevance.

fixes #7394.


git-svn-id: https://develop.svn.wordpress.org/trunk@25668 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-10-02 21:04:36 +00:00
parent f3722d70c1
commit dac3f63f9c
1 changed files with 1 additions and 1 deletions

View File

@ -2627,7 +2627,7 @@ class WP_Query {
// Order search results by relevance only when another "orderby" is not specified in the query.
if ( ! empty( $q['s'] ) ) {
$search_orderby = '';
if ( ! empty( $q['search_orderby_title'] ) && empty( $q['orderby'] ) )
if ( ! empty( $q['search_orderby_title'] ) && ( empty( $q['orderby'] ) && ! $this->is_feed ) || 'relevance' === $q['orderby'] )
$search_orderby = $this->parse_search_order( $q );
/**