By joelpittet on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
For consistency throughout core, we are using the attributes key to apply ['attributes']['class'] to a heading on #theme links and #theme menu_tree instead of ['class'].
Before in D7
$variables['secondary_menu'] = array(
'#theme' =>'links__system_secondary_menu',
'#links' => $variables['secondary_menu'],
'#heading' => array(
'text' => t('Secondary menu'),
'class' => array('visually-hidden'),
'attributes' => array('id' => 'links__system_secondary_menu'),
),
'#set_active_class' => TRUE,
);
After in D8
$variables['secondary_menu'] = array(
'#theme' =>'links__system_secondary_menu',
'#links' => $variables['secondary_menu'],
'#heading' => array(
'text' => t('Secondary menu'),
'attributes' => array(
'id' => 'links__system_secondary_menu',
'class' => array('visually-hidden'),
),
),
'#set_active_class' => TRUE,
);
Impacts:
Module developers
Themers