Implements hook_toolbar().
function tour_toolbar() {
if (!user_access('access tour')) {
return;
}
$tab['tour'] = array(
'#type' => 'toolbar_item',
'tab' => array(
'#type' => 'html_tag',
'#tag' => 'button',
'#value' => t('Tour'),
'#attributes' => array(
'class' => array(
'icon',
'icon-help',
),
'role' => 'button',
'aria-pressed' => 'false',
),
),
'#wrapper_attributes' => array(
'class' => array(
'tour-toolbar-tab',
'element-hidden',
),
'id' => 'toolbar-tab-tour',
),
'#attached' => array(
'library' => array(
array(
'tour',
'tour',
),
),
),
);
return $tab;
}