WordPress.org

Make WordPress Core

Changeset 41769


Ignore:
Timestamp:
10/05/17 02:27:02 (2 weeks ago)
Author:
SergeyBiryukov
Message:

REST API: After [41760], use correct query variable in WP_Term_Query::parse_orderby() when 'include_slugs' => 'slug__in' is passed.

See #40826.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-term-query.php

    r41760 r41769  
    845845            $orderby = "FIELD( t.term_id, $include )"; 
    846846        } elseif ( 'slug__in' == $_orderby && ! empty( $this->query_vars['slug'] ) && is_array( $this->query_vars['slug'] ) ) { 
    847             $slugs = implode( "', '", array_map( 'sanitize_title_for_query', $this->query_vars['slug__in'] ) ); 
     847            $slugs = implode( "', '", array_map( 'sanitize_title_for_query', $this->query_vars['slug'] ) ); 
    848848            $orderby = "FIELD( t.slug, '" . $slugs . "')"; 
    849849        } elseif ( 'none' == $_orderby ) { 
Note: See TracChangeset for help on using the changeset viewer.