Changeset 53276
- Timestamp:
- 04/26/2022 11:44:23 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-user-query.php
r53256 r53276 869 869 * @global wpdb $wpdb WordPress database abstraction object. 870 870 * 871 * @param string $s tring871 * @param string $search 872 872 * @param array $cols 873 873 * @param bool $wild Whether to allow wildcard searches. Default is false for Network Admin, true for single site. … … 875 875 * @return string 876 876 */ 877 protected function get_search_sql( $s tring, $cols, $wild = false ) {877 protected function get_search_sql( $search, $cols, $wild = false ) { 878 878 global $wpdb; 879 879 … … 881 881 $leading_wild = ( 'leading' === $wild || 'both' === $wild ) ? '%' : ''; 882 882 $trailing_wild = ( 'trailing' === $wild || 'both' === $wild ) ? '%' : ''; 883 $like = $leading_wild . $wpdb->esc_like( $s tring) . $trailing_wild;883 $like = $leading_wild . $wpdb->esc_like( $search ) . $trailing_wild; 884 884 885 885 foreach ( $cols as $col ) { 886 886 if ( 'ID' === $col ) { 887 $searches[] = $wpdb->prepare( "$col = %s", $s tring);887 $searches[] = $wpdb->prepare( "$col = %s", $search ); 888 888 } else { 889 889 $searches[] = $wpdb->prepare( "$col LIKE %s", $like );
Note: See TracChangeset
for help on using the changeset viewer.