Prepare some LIKEs
git-svn-id: http://svn.automattic.com/wordpress/trunk@17997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cb44c14449
commit
bde9c01453
|
@ -1284,8 +1284,10 @@ function &get_terms($taxonomies, $args = '') {
|
||||||
$where .= " AND t.slug = '$slug'";
|
$where .= " AND t.slug = '$slug'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !empty($name__like) )
|
if ( !empty($name__like) ) {
|
||||||
$where .= " AND t.name LIKE '" . like_escape( $name__like ) . "%'";
|
$name__like = like_escape( $name__like );
|
||||||
|
$where .= $wpdb->prepare( " AND t.name LIKE %s", $name__like . '%' );
|
||||||
|
}
|
||||||
|
|
||||||
if ( '' !== $parent ) {
|
if ( '' !== $parent ) {
|
||||||
$parent = (int) $parent;
|
$parent = (int) $parent;
|
||||||
|
@ -1307,7 +1309,7 @@ function &get_terms($taxonomies, $args = '') {
|
||||||
|
|
||||||
if ( !empty($search) ) {
|
if ( !empty($search) ) {
|
||||||
$search = like_escape($search);
|
$search = like_escape($search);
|
||||||
$where .= " AND (t.name LIKE '%$search%')";
|
$where .= $wpdb->prepare( " AND (t.name LIKE %s)", '%' . $search . '%');
|
||||||
}
|
}
|
||||||
|
|
||||||
$selects = array();
|
$selects = array();
|
||||||
|
|
Loading…
Reference in New Issue