Unverified Commit e0bba127 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3276615 by catch, mherchel: Remove olivero_form_comment_form_alter()...

Issue #3276615 by catch, mherchel: Remove olivero_form_comment_form_alter() comment button label override

(cherry picked from commit 0f903ca3)
parent 89d9f9d9
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -494,21 +494,6 @@ function olivero_preprocess_filter_caption(&$variables) {
  $variables['classes'] = isset($variables['classes']) && !empty($variables['classes']) ? $variables['classes'] . ' caption' : 'caption';
}

/**
 * Implements hook_form_FORM_ID_alter().
 */
function olivero_form_comment_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  $comment = $form_state->getFormObject()
    ->getEntity();
  /** @var \Drupal\comment\Entity\Comment $comment */
  if ($comment->hasParentComment()) {
    $form['actions']['submit']['#value'] = t('Reply to comment');
  }
  else {
    $form['actions']['submit']['#value'] = t('Post comment');
  }
}

/**
 * Implements hook_form_FORM_ID_alter().
 */