Changeset 15723 for trunk/wp-includes/functions.php
- Timestamp:
- 10/04/2010 09:05:31 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r15715 r15723 4238 4238 4239 4239 /* 4240 * Used internally to generate an SQL string for searching across multiple columns4241 *4242 * @access private4243 * @since 3.1.04244 *4245 * @param string $string4246 * @param array $cols4247 * @return string4248 */4249 function _wp_search_sql($string, $cols) {4250 $string = esc_sql($string);4251 4252 $searches = array();4253 foreach ( $cols as $col )4254 $searches[] = "$col LIKE '%$string%'";4255 4256 return ' AND (' . implode(' OR ', $searches) . ')';4257 }4258 4259 /*4260 4240 * Used internally to tidy up the search terms 4261 4241 *
Note: See TracChangeset
for help on using the changeset viewer.