Make WordPress Core

Changeset 58427

Timestamp:
06/18/2024 04:10:58 AM (7 weeks ago)
Author:
costdev
Message:

Taxonomy: Remove unused $term_ids in wp_set_object_terms().

In [5983], a call to clean_term_cache() was removed from wp_set_object_terms(). Since then, the $term_ids array that had been populated inside one of the foreach loops before being passed to the removed clean_term_cache() call has not been used.

This change removes the unused $term_ids variable.

Follow-up to [5983].

Props dlh, mukesh27.
Fixes #61456.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r58377 r58427  
    28262826
    28272827    $tt_ids     = array();
    2828     $term_ids   = array();
    28292828    $new_tt_ids = array();
    28302829
     
    28492848        }
    28502849
    2851         $term_ids[] = $term_info['term_id'];
    2852         $tt_id      = $term_info['term_taxonomy_id'];
    2853         $tt_ids[]   = $tt_id;
     2850        $tt_id    = $term_info['term_taxonomy_id'];
     2851        $tt_ids[] = $tt_id;
    28542852
    28552853        if ( $wpdb->get_var( $wpdb->prepare( "SELECT term_taxonomy_id FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id = %d", $object_id, $tt_id ) ) ) {
Note: See TracChangeset for help on using the changeset viewer.