From ff0bc5928cf5b10deb54f31827b36a2361b0379e Mon Sep 17 00:00:00 2001 From: nod_ <nod_@598310.no-reply.drupal.org> Date: Tue, 16 Apr 2024 11:27:05 +0200 Subject: [PATCH] Revert "Issue #3439844 by ivnish, KrakenBite, larowlan, smustgrave: Add setting to move comment form after comments" This reverts commit 26e593af8579f679e7cf7c148bb9e8661f5b2204. --- .../themes/olivero/config/install/olivero.settings.yml | 1 - core/themes/olivero/config/schema/olivero.schema.yml | 3 --- core/themes/olivero/olivero.post_update.php | 9 --------- core/themes/olivero/olivero.theme | 2 -- .../olivero/templates/field/field--comment.html.twig | 8 +------- core/themes/olivero/theme-settings.php | 10 ---------- 6 files changed, 1 insertion(+), 32 deletions(-) diff --git a/core/themes/olivero/config/install/olivero.settings.yml b/core/themes/olivero/config/install/olivero.settings.yml index a4248de13b7d..1e5d0344dbee 100644 --- a/core/themes/olivero/config/install/olivero.settings.yml +++ b/core/themes/olivero/config/install/olivero.settings.yml @@ -13,4 +13,3 @@ third_party_settings: mobile_menu_all_widths: 0 site_branding_bg_color: default base_primary_color: '#1b9ae4' -comment_form_position: 0 diff --git a/core/themes/olivero/config/schema/olivero.schema.yml b/core/themes/olivero/config/schema/olivero.schema.yml index aa72e00ffe2b..0bd946db2874 100644 --- a/core/themes/olivero/config/schema/olivero.schema.yml +++ b/core/themes/olivero/config/schema/olivero.schema.yml @@ -38,6 +38,3 @@ olivero.settings: base_primary_color: type: color_hex label: 'Base Primary Color' - comment_form_position: - type: integer - label: 'Comment form position' diff --git a/core/themes/olivero/olivero.post_update.php b/core/themes/olivero/olivero.post_update.php index a72722683857..f033945e02be 100644 --- a/core/themes/olivero/olivero.post_update.php +++ b/core/themes/olivero/olivero.post_update.php @@ -13,12 +13,3 @@ function olivero_post_update_add_olivero_primary_color() { ->set('base_primary_color', '#1b9ae4') ->save(); } - -/** - * Sets the `comment_form_position` value of Olivero's theme settings. - */ -function olivero_post_update_add_comment_form_position() { - \Drupal::configFactory()->getEditable('olivero.settings') - ->set('comment_form_position', 0) - ->save(TRUE); -} diff --git a/core/themes/olivero/olivero.theme b/core/themes/olivero/olivero.theme index c502d98c765b..6d4aa96bb0bf 100644 --- a/core/themes/olivero/olivero.theme +++ b/core/themes/olivero/olivero.theme @@ -540,8 +540,6 @@ function olivero_preprocess_field__comment(&$variables) { $variables['#cache']['contexts'][] = 'user'; } - - $variables['comment_form_position'] = theme_get_setting('comment_form_position'); } /** diff --git a/core/themes/olivero/templates/field/field--comment.html.twig b/core/themes/olivero/templates/field/field--comment.html.twig index 9a07538eee37..c69553cea34e 100644 --- a/core/themes/olivero/templates/field/field--comment.html.twig +++ b/core/themes/olivero/templates/field/field--comment.html.twig @@ -42,10 +42,6 @@ {{ title_suffix }} {% endif %} - {% if comment_form_position %} - {{ comments }} - {% endif %} - {% if comment_form %} <div class="add-comment"> {% if user_picture %} @@ -61,8 +57,6 @@ </div> {% endif %} - {% if not comment_form_position %} - {{ comments }} - {% endif %} + {{ comments }} </section> diff --git a/core/themes/olivero/theme-settings.php b/core/themes/olivero/theme-settings.php index 805261e329e4..849df4c11d5d 100644 --- a/core/themes/olivero/theme-settings.php +++ b/core/themes/olivero/theme-settings.php @@ -117,14 +117,4 @@ function olivero_form_system_theme_settings_alter(&$form, FormStateInterface $fo ], ]; } - - $form['olivero_settings']['olivero_utilities']['comment_form_position'] = [ - '#type' => 'radios', - '#title' => t('Comment form position'), - '#options' => [ - 0 => t('Before comments'), - 1 => t('After comments'), - ], - '#default_value' => theme_get_setting('comment_form_position'), - ]; } -- GitLab