mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
sanitize the value, not the field. Props cavemonkey50. fixes #4651
git-svn-id: http://svn.automattic.com/wordpress/trunk@5865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
74fcc19b8e
commit
7c1ce10fae
@ -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