Use correct var name
git-svn-id: http://svn.automattic.com/wordpress/trunk@12243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3e17d8b880
commit
8414c6c62f
|
@ -1680,13 +1680,13 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
|
|||
else
|
||||
return new WP_Error('duplicate_term_slug', sprintf(__('The slug “%s” is already in use by another term'), $slug));
|
||||
}
|
||||
do_action( 'edit_terms', $alias->term_id );
|
||||
do_action( 'edit_terms', $term_id );
|
||||
$wpdb->update($wpdb->terms, compact( 'name', 'slug', 'term_group' ), compact( 'term_id' ) );
|
||||
if ( empty($slug) ) {
|
||||
$slug = sanitize_title($name, $term_id);
|
||||
$wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
|
||||
}
|
||||
do_action( 'edited_terms', $alias->term_id );
|
||||
do_action( 'edited_terms', $term_id );
|
||||
|
||||
$tt_id = $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) );
|
||||
do_action( 'edit_term_taxonomy', $tt_id );
|
||||
|
|
Loading…
Reference in New Issue