sanitize the value, not the field. Props cavemonkey50. fixes #4651
git-svn-id: https://develop.svn.wordpress.org/trunk@5865 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
32ed9e221d
commit
ebf9ab90b6
@ -132,7 +132,7 @@ function get_term_by($field, $value, $taxonomy, $output = OBJECT) {
|
||||
|
||||
if ( 'slug' == $field ) {
|
||||
$field = 't.slug';
|
||||
$value = sanitize_title($field);
|
||||
$value = sanitize_title($value);
|
||||
if ( empty($value) )
|
||||
return false;
|
||||
} else if ( 'name' == $field ) {
|
||||
|
Loading…
Reference in New Issue
Block a user