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:
parent
4babadb704
commit
77a3cc733e
|
@ -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';
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue