Ticket #15249: 15249.2.diff
File 15249.2.diff, 1.8 KB (added by , 11 years ago) |
---|
-
src/wp-includes/comment.php
456 456 foreach ( $cols as $col ) 457 457 $searches[] = "$col LIKE '%$string%'"; 458 458 459 return ' AND (' . implode(' OR ', $searches) . ')'; 459 $search = ' AND (' . implode(' OR ', $searches) . ')'; 460 461 /** 462 * Filter the comment search SQL. 463 * 464 * @since 4.0.0 465 * 466 * @see WP_Comment_Query 467 * 468 * @param string $search Comment search SQL. 469 * @param string $string String to search for. 470 * @param array $cols List of columns to search. 471 * @param array $searches List of SQL clauses for each column to search. 472 */ 473 return apply_filters( 'comment_search_sql', $search, $string, $cols, $searches ); 460 474 } 461 475 } 462 476 -
src/wp-includes/user.php
809 809 $searches[] = "$col LIKE '$leading_wild" . like_escape($string) . "$trailing_wild'"; 810 810 } 811 811 812 return ' AND (' . implode(' OR ', $searches) . ')'; 812 $search = ' AND (' . implode(' OR ', $searches) . ')'; 813 814 /** 815 * Filter the user search SQL. 816 * 817 * @since 4.0.0 818 * 819 * @see WP_User_Query 820 * 821 * @param string $search User search SQL. 822 * @param string $string String to search for. 823 * @param array $cols List of columns to search. 824 * @param array $searches List of SQL clauses for each column to search. 825 * @param bool $wild Whether wildcard searches are allowed. Default false. 826 */ 827 return apply_filters( 'user_search_sql', $search, $string, $cols, $searches, $wild ); 813 828 } 814 829 815 830 /**