Commit c1d947b6 authored by catch's avatar catch

Issue #2713923 by NickWilde, markdorison: A Few attributes/new Attribute()...

Issue #2713923 by NickWilde, markdorison: A Few attributes/new Attribute() calls use strings instead of array for classes
parent a469aa22
......@@ -207,7 +207,7 @@ function template_preprocess_fieldset(&$variables) {
$variables['legend']['attributes'] = new Attribute();
// Add 'visually-hidden' class to legend span.
if ($variables['title_display'] == 'invisible') {
$variables['legend_span']['attributes'] = new Attribute(array('class' => 'visually-hidden'));
$variables['legend_span']['attributes'] = new Attribute(['class' => ['visually-hidden']]);
}
else {
$variables['legend_span']['attributes'] = new Attribute();
......
......@@ -618,11 +618,11 @@ function template_preprocess_views_view_table(&$variables) {
if (empty($variables['rows']) && !empty($options['empty_table'])) {
$build = $view->display_handler->renderArea('empty');
$variables['rows'][0]['columns'][0]['content'][0]['field_output'] = $build;
$variables['rows'][0]['attributes'] = new Attribute(array('class' => 'odd'));
$variables['rows'][0]['attributes'] = new Attribute(['class' => ['odd']]);
// Calculate the amounts of rows with output.
$variables['rows'][0]['columns'][0]['attributes'] = new Attribute(array(
'colspan' => count($variables['header']),
'class' => 'views-empty',
'class' => ['views-empty'],
));
}
......
......@@ -56,7 +56,7 @@ public function form(array $form, FormStateInterface $form_state) {
$form['preview'] = array(
'#weight' => 110,
'#theme_wrappers' => array('container'),
'#attributes' => array('id' => 'views-live-preview', 'class' => 'views-live-preview'),
'#attributes' => ['id' => 'views-live-preview', 'class' => ['views-live-preview']],
'preview' => $view->renderPreview($this->displayID, $args),
);
}
......
......@@ -169,7 +169,7 @@ function seven_form_node_form_alter(&$form, FormStateInterface $form_state) {
'#value' => $node->isPublished() ? t('Published') : t('Not published'),
'#access' => !$node->isNew(),
'#attributes' => array(
'class' => 'entity-meta__title',
'class' => ['entity-meta__title'],
),
),
'changed' => array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment