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:
parent
aac1622495
commit
d0b30bee2a
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user