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

See #40826.
Built from https://develop.svn.wordpress.org/trunk@41769


git-svn-id: http://core.svn.wordpress.org/trunk@41603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2017-10-05 02:28:47 +00:00
parent 275f4713a5
commit 2e8615f21e
2 changed files with 2 additions and 2 deletions

View File

@ -844,7 +844,7 @@ class WP_Term_Query {
$include = implode( ',', wp_parse_id_list( $this->query_vars['include'] ) );
$orderby = "FIELD( t.term_id, $include )";
} elseif ( 'slug__in' == $_orderby && ! empty( $this->query_vars['slug'] ) && is_array( $this->query_vars['slug'] ) ) {
$slugs = implode( "', '", array_map( 'sanitize_title_for_query', $this->query_vars['slug__in'] ) );
$slugs = implode( "', '", array_map( 'sanitize_title_for_query', $this->query_vars['slug'] ) );
$orderby = "FIELD( t.slug, '" . $slugs . "')";
} elseif ( 'none' == $_orderby ) {
$orderby = '';

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41768';
$wp_version = '4.9-alpha-41769';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.