1.20.x admin_bar.inc admin_bar_links_search()

Build search widget.

See also

theme_admin_bar_links()

File

modules/admin_bar/admin_bar.inc, line 637
Menu builder functions for Administration bar.

Code

function admin_bar_links_search() {
  $search['search'] = array(
    '#pre_render' => array(),
    '#attributes' => array(
      'class' => array('admin-bar-search'),
    ),
  );
  $search['search']['search'] = array(
    '#type' => 'search',
    '#title' => t('Admin search'),
    '#title_display' => 'invisible',
    '#attributes' => array(
      'placeholder' => t('Menu search'),
      'autocomplete' => 'off',
      'autocorrect' => 'off',
      'autocapitalize' => 'off',
    ),
    '#id' => 'admin-bar-search-items',
  );
  return $search;
}