WordPress.org

Make WordPress Core

Ticket #47719: 47719.1.diff

File 47719.1.diff, 646 bytes (added by audrasjb, 2 years ago)

Removing useless $inclusions var

  • 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 4483c2f..f5adc42 100644
    a b class WP_Term_Query { 
    409409                $exclude_tree = $args['exclude_tree'];
    410410                $include      = $args['include'];
    411411
    412                 $inclusions = '';
    413412                if ( ! empty( $include ) ) {
    414413                        $exclude      = '';
    415414                        $exclude_tree = '';
    416415                        $inclusions   = implode( ',', wp_parse_id_list( $include ) );
    417                 }
    418 
    419                 if ( ! empty( $inclusions ) ) {
    420416                        $this->sql_clauses['where']['inclusions'] = 't.term_id IN ( ' . $inclusions . ' )';
    421417                }
    422418