diff --git a/core/lib/Drupal/Core/Block/BlockPluginInterface.php b/core/lib/Drupal/Core/Block/BlockPluginInterface.php index fef3e9c..26624fa 100644 --- a/core/lib/Drupal/Core/Block/BlockPluginInterface.php +++ b/core/lib/Drupal/Core/Block/BlockPluginInterface.php @@ -29,8 +29,11 @@ /** * Indicates the block label (title) should hidden from end users. + * + * @todo This value should be changed to "hidden" in Drupal 9.0.0 for + * consistency. See https://www.drupal.org/node/2863313. */ - const BLOCK_LABEL_HIDDEN = 'hidden'; + const BLOCK_LABEL_HIDDEN = '0'; /** * Indicates the block label (title) should be visually-hidden from end users. diff --git a/core/modules/block/block.install b/core/modules/block/block.install index c65eabd..6545a19 100644 --- a/core/modules/block/block.install +++ b/core/modules/block/block.install @@ -5,7 +5,6 @@ * Contains install and update functions for Block. */ -use Drupal\Core\Block\BlockPluginInterface; use Drupal\Core\Cache\Cache; /** @@ -118,26 +117,3 @@ function block_update_8003() { return t('Block settings updated.'); } - -/** - * Convert hidden label_display setting. - */ -function block_update_8004() { - $config_factory = \Drupal::configFactory(); - foreach ($config_factory->listAll('block.block.') as $block_config_name) { - $block = $config_factory->getEditable($block_config_name); - - // Convert the 'label_display' setting. - $settings = $block->get('settings'); - if ($settings['label_display'] == 0) { - $settings['label_display'] = BlockPluginInterface::BLOCK_LABEL_HIDDEN; - } - $block->set('settings', $settings); - - // Mark the resulting configuration as trusted data. This avoids issues with - // future schema changes. - $block->save(TRUE); - } - - return t('Block settings updated.'); -} diff --git a/core/modules/system/templates/block--system-menu-block.html.twig b/core/modules/system/templates/block--system-menu-block.html.twig index a0bd200..6113bc2 100644 --- a/core/modules/system/templates/block--system-menu-block.html.twig +++ b/core/modules/system/templates/block--system-menu-block.html.twig @@ -36,7 +36,7 @@ {% set heading_id = attributes.id ~ '-menu'|clean_id %}