Prepare some LIKEs
git-svn-id: https://develop.svn.wordpress.org/trunk@17997 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f82a14802e
commit
ae5e08e457
@ -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
Block a user