Changeset 16351 for trunk/wp-includes/comment.php
- Timestamp:
- 11/13/2010 06:18:45 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r16149 r16351 342 342 return $comments; 343 343 } 344 345 /* 346 * Used internally to generate an SQL string for searching across multiple columns 347 * 348 * @access protected 349 * @since 3.1.0 350 * 351 * @param string $string 352 * @param array $cols 353 * @return string 354 */ 355 function get_search_sql( $string, $cols ) { 356 $string = esc_sql( $string ); 357 358 $searches = array(); 359 foreach ( $cols as $col ) 360 $searches[] = "$col LIKE '%$string%'"; 361 362 return ' AND (' . implode(' OR ', $searches) . ')'; 363 } 344 364 } 345 365
Note: See TracChangeset
for help on using the changeset viewer.