WordPress.org

Make WordPress Core

Ticket #44630: wp-term-query.diff

File wp-term-query.diff, 635 bytes (added by ettoredn, 2 years ago)

Patch

  • src/wp-includes/class-wp-term-query.php

    diff --git a/src/wp-includes/class-wp-term-query.php b/src/wp-includes/class-wp-term-query.php
    index 5890bf714a..2940a00030 100644
    a b class WP_Term_Query { 
    552552                $offset = $args['offset'];
    553553
    554554                // Don't limit the query results when we have to descend the family tree.
    555                 if ( $number && ! $hierarchical && ! $child_of && '' === $parent ) {
     555                if ( $number && empty( $args['object_ids'] ) && ! $hierarchical && ! $child_of && '' === $parent ) {
    556556                        if ( $offset ) {
    557557                                $limits = 'LIMIT ' . $offset . ',' . $number;
    558558                        } else {