WordPress.org

Make WordPress Core

Ticket #20493: merge-terms-with-children.diff

File merge-terms-with-children.diff, 495 bytes (added by wonderboymusic, 6 years ago)
  • wp-includes/taxonomy.php

     
    755755                                $children = array_merge( $children, get_term_children( $term, $query['taxonomy'] ) );
    756756                                $children[] = $term;
    757757                        }
    758                         $query['terms'] = $children;
     758                        $query['terms'] = array_merge( $query['terms'], $children );
    759759                }
    760760
    761761                $this->transform_query( $query, 'term_taxonomy_id' );