mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 14:35:07 +00:00
Prepare some LIKEs
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@18021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6fcc6b739a
commit
5966a08d07
@ -1255,8 +1255,10 @@ function &get_terms($taxonomies, $args = '') {
|
||||
$where .= " AND t.slug = '$slug'";
|
||||
}
|
||||
|
||||
if ( !empty($name__like) )
|
||||
$where .= " AND t.name LIKE '" . like_escape( $name__like ) . "%'";
|
||||
if ( !empty($name__like) ) {
|
||||
$name__like = like_escape( $name__like );
|
||||
$where .= $wpdb->prepare( " AND t.name LIKE %s", $name__like . '%' );
|
||||
}
|
||||
|
||||
if ( '' !== $parent ) {
|
||||
$parent = (int) $parent;
|
||||
@ -1278,7 +1280,7 @@ function &get_terms($taxonomies, $args = '') {
|
||||
|
||||
if ( !empty($search) ) {
|
||||
$search = like_escape($search);
|
||||
$where .= " AND (t.name LIKE '%$search%')";
|
||||
$where .= $wpdb->prepare( " AND (t.name LIKE %s)", '%' . $search . '%');
|
||||
}
|
||||
|
||||
$selects = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user