';
- if (system_admin_compact_mode()) {
- $output .= l(t('Show descriptions'), 'admin/compact/off', array('attributes' => array('title' => t('Expand layout to include descriptions.')), 'query' => drupal_get_destination()));
- }
- else {
- $output .= l(t('Hide descriptions'), 'admin/compact/on', array('attributes' => array('title' => t('Compress layout by hiding descriptions.')), 'query' => drupal_get_destination()));
- }
- $output .= '
';
-
- return $output;
-}
-
-/**
* Attempts to get a file using Guzzle HTTP client and to store it locally.
*
* @param string $url
diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig
index d38b028..80f4d93 100644
--- a/core/modules/system/templates/field.html.twig
+++ b/core/modules/system/templates/field.html.twig
@@ -21,8 +21,9 @@
* - title_attributes: HTML attributes for the title.
* - label: The label for the field.
* - content_attributes: HTML attributes for the content.
- * - items: List of all the field items.
- * - item_attributes: List of HTML attributes for each item.
+ * - items: List of all the field items. Each item contains:
+ * - #attributes: List of HTML attributes for each item.
+ * - content: The field item's content.
*
* @see template_preprocess_field()
*
@@ -31,11 +32,11 @@
#}
{% if not label_hidden %}
-
{{ label }}:
+
{{ label }}:
{% endif %}
-
- {% for delta, item in items %}
-
{{ item }}
+
+ {% for item in items %}
+
{{ item.content }}
{% endfor %}
diff --git a/core/modules/user/src/Form/UserPermissionsForm.php b/core/modules/user/src/Form/UserPermissionsForm.php
index 3f89bb6..1a6643a 100644
--- a/core/modules/user/src/Form/UserPermissionsForm.php
+++ b/core/modules/user/src/Form/UserPermissionsForm.php
@@ -97,7 +97,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$hide_descriptions = system_admin_compact_mode();
$form['system_compact_link'] = array(
- '#theme' => 'system_compact_link',
+ '#type' => 'system_compact_link',
);
$form['permissions'] = array(
diff --git a/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig b/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig
index 4c579ee..c08299e 100644
--- a/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig
+++ b/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig
@@ -9,20 +9,21 @@
* - title_attributes: HTML attributes for the label.
* - label: The label for the field.
* - content_attributes: HTML attributes for the content.
- * - items: List of all the field items.
- * - item_attributes: List of HTML attributes for each item.
+ * - items: List of all the field items. Each item contains:
+ * - #attributes: List of HTML attributes for each item.
+ * - content: The field item's content.
*
* @see template_preprocess_field()
* @see bartik_preprocess_field()
*/
#}
-
+
{% if not label_hidden %}
{{ label }}:
{% endif %}
-
- {% for delta, item in items %}
- - {{ item }}
+
+ {% for item in items %}
+ - {{ item.content }}
{% endfor %}