WordPress.org

Make WordPress Core

Ticket #50871: 50871.patch

File 50871.patch, 787 bytes (added by 5um17, 4 months ago)
  • wp-includes/class-wp-query.php

     
    23652365                // Order search results by relevance only when another "orderby" is not specified in the query.
    23662366                if ( ! empty( $q['s'] ) ) {
    23672367                        $search_orderby = '';
    2368                         if ( ! empty( $q['search_orderby_title'] ) && ( empty( $q['orderby'] ) && ! $this->is_feed ) || ( isset( $q['orderby'] ) && 'relevance' === $q['orderby'] ) ) {
     2368                        if ( ! empty( $q['search_orderby_title'] ) && ( ( empty( $q['orderby'] ) && ! $this->is_feed ) || ( isset( $q['orderby'] ) && 'relevance' === $q['orderby'] ) ) ) {
    23692369                                $search_orderby = $this->parse_search_order( $q );
    23702370                        }
    23712371