function callback_search_conditions


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 search.api.php callback_search_conditions($keys)
cle7 search.api.php callback_search_conditions($keys)
elmsmedia7 search.api.php callback_search_conditions($keys)
icor7 search.api.php callback_search_conditions($keys)
meedjum_blog7 search.api.php callback_search_conditions($keys)
mooc7 search.api.php callback_search_conditions($keys)

Provide search query conditions.

Callback for hook_search_info().

This callback is invoked by search_view() to get an array of additional search conditions to pass to search_data(). For example, a search module may get additional keywords, filters, or modifiers for the search from the query string.

This example pulls additional search keywords out of the $_REQUEST variable, (i.e. from the query string of the request). The conditions may also be generated internally - for example based on a module's settings.


$keys: The search keywords string.

Return value

An array of additional conditions, such as filters.

Related topics

1 string reference to 'callback_search_conditions'
hook_search_info in modules/search/search.api.php
Define a custom search type.


modules/search/search.api.php, line 363
Hooks provided by the Search module.


function callback_search_conditions($keys) {
  $conditions = array();

  if (!empty($_REQUEST['keys'])) {
    $conditions['keys'] = $_REQUEST['keys'];
  if (!empty($_REQUEST['sample_search_keys'])) {
    $conditions['sample_search_keys'] = $_REQUEST['sample_search_keys'];
  if ($force_keys = config('sample_search.settings')->get('force_keywords')) {
    $conditions['sample_search_force_keywords'] = $force_keys;
  return $conditions;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.