From d4d1fcda0f7e33a808b69060b7d8753b37a59d13 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 20 Aug 2014 17:04:18 +0000 Subject: [PATCH] `wp_update_term()` should mimic `wp_insert_term()` and set a value for `$term_group` before the `alias_of` logic runs. This ensures that `$term_group` exists when `compact()` is called. See [28461]. Fixes #29278. Built from https://develop.svn.wordpress.org/trunk@29549 git-svn-id: http://core.svn.wordpress.org/trunk@29325 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index d823c59ca6..5846844631 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2957,6 +2957,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) { $parsed_args['slug'] = $slug; + $term_group = isset( $parsed_args['term_group'] ) ? $parsed_args['term_group'] : 0; if ( $args['alias_of'] ) { $alias = $wpdb->get_row( $wpdb->prepare( "SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $args['alias_of'] ) ); if ( $alias->term_group ) {