You are here

function custom_search_theme_registry_alter in Custom Search 8

Implements hook_theme_registry_alter().

See also

https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api....

File

./custom_search.module, line 456
Bring customizations to the default search box.

Code

function custom_search_theme_registry_alter(&$theme_registry) {
  if (isset($theme_registry['item_list__search_results'])) {
    $theme_registry['item_list__search_results']['template'] = 'custom-search-results';
    $theme_registry['item_list__search_results']['path'] = drupal_get_path('module', 'custom_search') . '/templates';
    $theme_registry['item_list__search_results']['variables']['filter_position'] = FALSE;
    $theme_registry['item_list__search_results']['variables']['filter'] = '';
  }
  if (isset($theme_registry['search_result'])) {
    $theme_registry['search_result']['template'] = 'custom-search-result';
    $theme_registry['search_result']['path'] = drupal_get_path('module', 'custom_search') . '/templates';
  }
}