Changeset 53280 for trunk/src/wp-includes/class-wp-comment-query.php
- Timestamp:
- 04/26/2022 02:02:14 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-comment-query.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-comment-query.php
r53272 r53280 1127 1127 1128 1128 /** 1129 * Used internally to generate an SQL string for searching across multiple columns 1129 * Used internally to generate an SQL string for searching across multiple columns. 1130 1130 * 1131 1131 * @since 3.1.0 … … 1133 1133 * @global wpdb $wpdb WordPress database abstraction object. 1134 1134 * 1135 * @param string $search1136 * @param array $cols1137 * @return string 1138 */ 1139 protected function get_search_sql( $search, $col s ) {1135 * @param string $search Search string. 1136 * @param string[] $columns Array of columns to search. 1137 * @return string Search SQL. 1138 */ 1139 protected function get_search_sql( $search, $columns ) { 1140 1140 global $wpdb; 1141 1141 … … 1143 1143 1144 1144 $searches = array(); 1145 foreach ( $col s as $col) {1146 $searches[] = $wpdb->prepare( "$col LIKE %s", $like );1145 foreach ( $columns as $column ) { 1146 $searches[] = $wpdb->prepare( "$column LIKE %s", $like ); 1147 1147 } 1148 1148
Note: See TracChangeset
for help on using the changeset viewer.