You are here

function custom_search_contextual_links_view_alter in Custom Search 7

Implements hook_link().

File

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

Code

function custom_search_contextual_links_view_alter(&$element, $items) {
  if (isset($element['#element']['#form_id']) && $element['#element']['#form_id'] == 'search_block_form' && user_access('administer custom search')) {
    $element['#links']['custom_search'] = array(
      'title' => t('Custom Search configuration'),
      'href' => 'admin/config/search/custom_search',
      'query' => drupal_get_destination(),
    );
  }
}