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

git-svn-id: http://svn.automattic.com/wordpress/trunk@15491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu
2010-08-11 21:54:51 +00:00
parent 113a5038ce
commit 020ce73746
42 changed files with 6122 additions and 5506 deletions

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
*