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.
Built from https://develop.svn.wordpress.org/trunk@58427


git-svn-id: http://core.svn.wordpress.org/trunk@57876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
costdev 2024-06-18 04:12:11 +00:00
parent 1e3f4a7c9f
commit aeb9f37238
2 changed files with 3 additions and 5 deletions

View File

@ -2825,7 +2825,6 @@ function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
}
$tt_ids = array();
$term_ids = array();
$new_tt_ids = array();
foreach ( (array) $terms as $term ) {
@ -2848,9 +2847,8 @@ function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
return $term_info;
}
$term_ids[] = $term_info['term_id'];
$tt_id = $term_info['term_taxonomy_id'];
$tt_ids[] = $tt_id;
$tt_id = $term_info['term_taxonomy_id'];
$tt_ids[] = $tt_id;
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 ) ) ) {
continue;

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-beta2-58426';
$wp_version = '6.6-beta2-58427';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.