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

git-svn-id: http://svn.automattic.com/wordpress/trunk@11151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-05-01 20:59:14 +00:00
parent d409315d8c
commit e52d7eee0b
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;