mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
git-svn-id: http://svn.automattic.com/wordpress/trunk@5658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d5f3d0c2d7
commit
bac1fccf3a
@ -216,8 +216,6 @@ function wp_update_term( $term, $taxonomy, $args = array() ) {
|
|||||||
$args = wp_parse_args($args, $defaults);
|
$args = wp_parse_args($args, $defaults);
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
$parent = (int) $parent;
|
|
||||||
|
|
||||||
if ( empty($slug) )
|
if ( empty($slug) )
|
||||||
$slug = sanitize_title($name);
|
$slug = sanitize_title($name);
|
||||||
else
|
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'");
|
$wpdb->query("UPDATE $wpdb->terms SET name = '$name', slug = '$slug', term_group = '$term_group' WHERE term_id = '$term_id'");
|
||||||
|
|
||||||
if ( empty($slug) ) {
|
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'");
|
$wpdb->query("UPDATE $wpdb->terms SET slug = '$slug' WHERE term_id = '$term_id'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user