Changeset 28712 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 06/10/2014 12:43:32 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r28653 r28712 1481 1481 1482 1482 if ( ! empty( $args['name__like'] ) ) { 1483 $name__like = like_escape( $args['name__like'] ); 1484 $where .= $wpdb->prepare( " AND t.name LIKE %s", '%' . $name__like . '%' ); 1483 $where .= $wpdb->prepare( " AND t.name LIKE %s", '%' . $wpdb->esc_like( $args['name__like'] ) . '%' ); 1485 1484 } 1486 1485 1487 1486 if ( ! empty( $args['description__like'] ) ) { 1488 $description__like = like_escape( $args['description__like'] ); 1489 $where .= $wpdb->prepare( " AND tt.description LIKE %s", '%' . $description__like . '%' ); 1487 $where .= $wpdb->prepare( " AND tt.description LIKE %s", '%' . $wpdb->esc_like( $args['description__like'] ) . '%' ); 1490 1488 } 1491 1489 … … 1518 1516 1519 1517 if ( ! empty( $args['search'] ) ) { 1520 $ search = like_escape( $args['search'] );1521 $where .= $wpdb->prepare( ' AND ((t.name LIKE %s) OR (t.slug LIKE %s))', '%' . $search . '%', '%' . $search . '%');1518 $like = '%' . $wpdb->esc_like( $args['search'] ) . '%'; 1519 $where .= $wpdb->prepare( ' AND ((t.name LIKE %s) OR (t.slug LIKE %s))', $like, $like ); 1522 1520 } 1523 1521
Note: See TracChangeset
for help on using the changeset viewer.