Ajaxify list-type screens in the admin. See #14579

git-svn-id: https://develop.svn.wordpress.org/trunk@15491 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu
2010-08-11 21:54:51 +00:00
parent 18a112a466
commit fb9394167f
42 changed files with 6122 additions and 5506 deletions
+21
View File
@@ -4194,6 +4194,27 @@ function get_file_data( $file, $default_headers, $context = '' ) {
return $file_data;
}
/*
* Used internally to generate an SQL string for searching across multiple columns
*
* @access private
* @since 3.1.0
*
* @param string $string
* @param array $cols
* @return string
*/
function _wp_search_sql($string, $cols) {
$string = esc_sql($string);
$searches = array();
foreach ( $cols as $col )
$searches[] = "$col LIKE '%$string%'";
return ' AND (' . implode(' OR ', $searches) . ')';
}
/*
* Used internally to tidy up the search terms
*