You are here

function custom_search_theme in Custom Search 6

Same name and namespace in other branches
  1. 8 custom_search.module \custom_search_theme()
  2. 7 custom_search.module \custom_search_theme()

Implementation of hook_theme().

File

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

Code

function custom_search_theme() {
  $path = drupal_get_path('module', 'custom_search') . '/theme';
  $custom_search_theme_array = array(
    'custom_search_javascript' => array(
      'arguments' => array(),
    ),
    'custom_search_sort_form' => array(
      'path' => $path,
      'template' => 'custom_search-sort-form',
      'arguments' => array(
        'form' => NULL,
      ),
    ),
    'search_results' => array(
      'arguments' => array(
        'results' => NULL,
        'type' => NULL,
      ),
      'path' => $path,
      'file' => 'custom_search.pages.inc',
      'template' => 'custom_search-results',
    ),
    'search_result' => array(
      'arguments' => array(
        'result' => NULL,
        'type' => NULL,
      ),
      'path' => $path,
      'file' => 'custom_search.pages.inc',
      'template' => 'custom_search-result',
    ),
  );

  // Panels integration
  $search_results_page_callback = menu_get_item('search/node/%menu_tail');
  if ($search_results_page_callback['page_callback'] == 'page_manager_search_page') {
    unset($custom_search_theme_array['search_results'], $custom_search_theme_array['search_result']);
  }
  return $custom_search_theme_array;
}