mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Query: 'orderby=include' should support comma-separated lists.
[30052] assumed that 'include' would be an array. Props TimothyBlynJacobs. Fixes #37904. git-svn-id: https://develop.svn.wordpress.org/trunk@38500 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user