1.12.x admin_bar.inc admin_bar_links_search()
1.10.x admin_bar.inc admin_bar_links_search()
1.11.x admin_bar.inc admin_bar_links_search()
1.7.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 640
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' => 'attribute',
    '#attributes' => array(
      'placeholder' => t('Menu search'),
      'autocomplete' => 'off',
      'autocorrect' => 'off',
      'autocapitalize' => 'off',
    ),
  );
  return $search;
}