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. git-svn-id: https://develop.svn.wordpress.org/trunk@29549 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
523fbc1b21
commit
192cbe0644
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user