WordPress.org

Make WordPress Core

Ticket #37904: 37904.diff

File 37904.diff, 689 bytes (added by TimothyBlynJacobs, 4 years ago)
  • src/wp-includes/class-wp-term-query.php

     
    773773                } elseif ( 'slug' == $_orderby ) {
    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 ) {
    779779                        $orderby = 't.term_group';