diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-26 17:06:54 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-26 17:06:54 +0000 |
commit | a73705a087d75e78f101abf58b4f1db2ac867182 (patch) | |
tree | dc1fb31d3e083ba3801ac63dba010ff3eee758e8 | |
parent | d338975666fdecdc1fd20556f4738db6a12c3919 (diff) | |
download | wordpress-mu-a73705a087d75e78f101abf58b4f1db2ac867182.tar.gz wordpress-mu-a73705a087d75e78f101abf58b4f1db2ac867182.tar.xz wordpress-mu-a73705a087d75e78f101abf58b4f1db2ac867182.zip |
Always set the slug to be the sanitized term name, fixes #476, thanks options
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1136 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r-- | wp-includes/taxonomy.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 7fdf962..57b7b2d 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1034,8 +1034,8 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) { // expected_slashed ($name) $name = stripslashes($name); - if ( empty($slug) ) - $slug = sanitize_title($name); + // slug is always santized name in WordPress MU + $slug = sanitize_title($name); $term_group = 0; if ( $alias_of ) { @@ -1244,11 +1244,9 @@ function wp_update_term( $term, $taxonomy, $args = array() ) { $args = sanitize_term($args, $taxonomy, 'db'); extract($args, EXTR_SKIP); - $empty_slug = false; - if ( empty($slug) ) { - $empty_slug = true; - $slug = sanitize_title($name); - } + // slug is always santized name in WordPress MU + $empty_slug = true; + $slug = sanitize_title($name); if ( $alias_of ) { $alias = $wpdb->get_row( $wpdb->prepare( "SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $alias_of) ); |