Changeset 53274
- Timestamp:
- 04/26/2022 11:41:27 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-site-query.php
r53175 r53274 740 740 * @global wpdb $wpdb WordPress database abstraction object. 741 741 * 742 * @param string $s tringSearch string.742 * @param string $search Search string. 743 743 * @param string[] $columns Array of columns to search. 744 744 * @return string Search SQL. 745 745 */ 746 protected function get_search_sql( $s tring, $columns ) {746 protected function get_search_sql( $search, $columns ) { 747 747 global $wpdb; 748 748 749 if ( false !== strpos( $s tring, '*' ) ) {750 $like = '%' . implode( '%', array_map( array( $wpdb, 'esc_like' ), explode( '*', $s tring) ) ) . '%';749 if ( false !== strpos( $search, '*' ) ) { 750 $like = '%' . implode( '%', array_map( array( $wpdb, 'esc_like' ), explode( '*', $search ) ) ) . '%'; 751 751 } else { 752 $like = '%' . $wpdb->esc_like( $s tring) . '%';752 $like = '%' . $wpdb->esc_like( $search ) . '%'; 753 753 } 754 754
Note: See TracChangeset
for help on using the changeset viewer.