Query: 'orderby=include' should support comma-separated lists.

[30052] assumed that 'include' would be an array.

Props TimothyBlynJacobs.
Fixes #37904.
Built from https://develop.svn.wordpress.org/trunk@38500


git-svn-id: http://core.svn.wordpress.org/trunk@38441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2016-09-01 16:51:30 +00:00
parent 4babadb704
commit 77a3cc733e
2 changed files with 2 additions and 2 deletions

View File

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

View File

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