mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
git-svn-id: https://develop.svn.wordpress.org/trunk@5658 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -216,8 +216,6 @@ function wp_update_term( $term, $taxonomy, $args = array() ) {
|
||||
$args = wp_parse_args($args, $defaults);
|
||||
extract($args);
|
||||
|
||||
$parent = (int) $parent;
|
||||
|
||||
if ( empty($slug) )
|
||||
$slug = sanitize_title($name);
|
||||
else
|
||||
@@ -238,7 +236,7 @@ function wp_update_term( $term, $taxonomy, $args = array() ) {
|
||||
$wpdb->query("UPDATE $wpdb->terms SET name = '$name', slug = '$slug', term_group = '$term_group' WHERE term_id = '$term_id'");
|
||||
|
||||
if ( empty($slug) ) {
|
||||
$slug = sanitize_title($slug, $term_id);
|
||||
$slug = sanitize_title($name, $term_id);
|
||||
$wpdb->query("UPDATE $wpdb->terms SET slug = '$slug' WHERE term_id = '$term_id'");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user