Make get_term_by() use sanitize_title_for_query() too. See #9591
git-svn-id: http://svn.automattic.com/wordpress/trunk@16832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1474c1a64a
commit
8ba8d20f16
|
@ -781,7 +781,7 @@ function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw
|
||||||
|
|
||||||
if ( 'slug' == $field ) {
|
if ( 'slug' == $field ) {
|
||||||
$field = 't.slug';
|
$field = 't.slug';
|
||||||
$value = sanitize_title($value);
|
$value = sanitize_title_for_query($value);
|
||||||
if ( empty($value) )
|
if ( empty($value) )
|
||||||
return false;
|
return false;
|
||||||
} else if ( 'name' == $field ) {
|
} else if ( 'name' == $field ) {
|
||||||
|
|
Loading…
Reference in New Issue