mirror of
https://github.com/WordPress/WordPress.git
synced 2025-04-02 18:16:07 +02:00
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
This commit is contained in:
parent
3d98d94878
commit
d4d1fcda0f
@ -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