Make WordPress Core


Ignore:
Timestamp:
09/01/2016 04:50:47 PM (8 years ago)
Author:
boonebgorges
Message:

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

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

Props TimothyBlynJacobs.
Fixes #37904.

File:
1 edited

Legend:

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

    r38377 r38500  
    774774            $orderby = 't.slug';
    775775        } elseif ( 'include' == $_orderby && ! empty( $this->query_vars['include'] ) ) {
    776             $include = implode( ',', array_map( 'absint', $this->query_vars['include'] ) );
     776            $include = implode( ',', wp_parse_id_list( $this->query_vars['include'] ) );
    777777            $orderby = "FIELD( t.term_id, $include )";
    778778        } elseif ( 'term_group' == $_orderby ) {
Note: See TracChangeset for help on using the changeset viewer.