diff -u b/core/modules/block/src/BlockListBuilder.php b/core/modules/block/src/BlockListBuilder.php --- b/core/modules/block/src/BlockListBuilder.php +++ b/core/modules/block/src/BlockListBuilder.php @@ -271,14 +271,11 @@ $form[$entity_id]['#attributes']['class'][] = 'color-success'; $form[$entity_id]['#attributes']['class'][] = 'js-block-placed'; } - if ($info['status']) { - $form[$entity_id]['info']['#plain_text'] = $info['label']; - } - else { - $form[$entity_id]['info']['#markup'] = $this->t('@label (disabled)', ['@label' => $info['label']]); - } - $form[$entity_id]['info']['#wrapper_attributes'] = [ - 'class' => ['block'], + $form[$entity_id]['info'] = [ + '#markup' => $info['status'] ? $info['label'] : $this->t('@label (disabled)', ['@label' => $info['label']]), + '#wrapper_attributes' => [ + 'class' => ['block'], + ], ]; $form[$entity_id]['type'] = [ '#markup' => $info['category'],