summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2016-10-19 14:03:36 +0100
committerNathaniel Catchpole2016-10-19 14:03:36 +0100
commitc1d947b6d45f2dfa06d4d979ef7ff61b842a5e5d (patch)
treef6841642c4ad44d5ab50267fce0544b852f93f35
parenta469aa222c04282777da6b8cb0e9ec1789975d24 (diff)
Issue #2713923 by NickWilde, markdorison: A Few attributes/new Attribute() calls use strings instead of array for classes
-rw-r--r--core/includes/form.inc2
-rw-r--r--core/modules/views/views.theme.inc4
-rw-r--r--core/modules/views_ui/src/ViewPreviewForm.php2
-rw-r--r--core/themes/seven/seven.theme2
4 files changed, 5 insertions, 5 deletions
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 7dd168b..b4c6a71 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -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();
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index 94c519e..8dcdf67 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -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'],
));
}
diff --git a/core/modules/views_ui/src/ViewPreviewForm.php b/core/modules/views_ui/src/ViewPreviewForm.php
index 48e22c5..7b77929 100644
--- a/core/modules/views_ui/src/ViewPreviewForm.php
+++ b/core/modules/views_ui/src/ViewPreviewForm.php
@@ -56,7 +56,7 @@ class ViewPreviewForm extends ViewFormBase {
$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),
);
}
diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme
index 5ace6b8..64ee724 100644
--- a/core/themes/seven/seven.theme
+++ b/core/themes/seven/seven.theme
@@ -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(