Trim term before checking if it already exists. Props jhodgdon. fixes #9397

git-svn-id: https://develop.svn.wordpress.org/trunk@11151 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-05-01 20:59:14 +00:00
parent aac1622495
commit d0b30bee2a
1 changed files with 2 additions and 0 deletions

View File

@ -865,6 +865,8 @@ function is_term($term, $taxonomy = '', $parent = 0) {
return $wpdb->get_var( $wpdb->prepare( $select . $where, $term ) );
}
$term = trim( $term );
if ( '' === $slug = sanitize_title($term) )
return 0;