diff --git a/core/modules/block/block.install b/core/modules/block/block.install index 5e72ac2..40184f9 100644 --- a/core/modules/block/block.install +++ b/core/modules/block/block.install @@ -18,9 +18,9 @@ function block_update_8001() { // https://www.drupal.org/node/2354889 // // Core visibility context plugins are updated automatically; blocks with - // unknown plugins are disabled and their previous visibility settings are saved - // in key value storage; see change record https://www.drupal.org/node/2527840 - // for more explanation. + // unknown plugins are disabled and their previous visibility settings are + // saved in key value storage; see change record + // https://www.drupal.org/node/2527840 for more explanation. // These 3 are all the contexts that Drupal core provides. $context_service_id_map = [ @@ -42,12 +42,12 @@ function block_update_8001() { $condition_plugin_id_label_map['user_role'] = \Drupal::translation()->translate('Roles'); // Using the Entity API is fine as long we change the value from one valid - // value to another value. In this update function we though deal with + // value to another value. In this update function however, we deal with // converting the format of the context_mapping, which makes code reacting // to Entity API hooks tricky, because they would need to be different for // before/after the update. - // For updating the status flag of the block in the next update function we - // though can use Entity API. + // For updating the status flag of the block in the next update function, + // however, we can use Entity API. $config_factory = \Drupal::configFactory(); $message = NULL; $disabled_blocks = $problematic_visibility_plugins = $backup_values = []; @@ -81,8 +81,7 @@ function block_update_8001() { if ($backup_values) { // We not only store the missing context mappings but also the - // previous block status so contrib modules could update - + // previous block status so contributed and custom modules could update. $update_backup[$block->get('id')] = ['missing_context_ids' => $backup_values, 'status' => $block->get('status')]; } } @@ -98,10 +97,10 @@ function block_update_8001() { } /** - * Disables all blocks which had missing context mappings. + * Disables all blocks from the previous update. */ function block_update_8002() { - // Note: For this update function its fine to use the entity API, see the + // Note: For this update function it's fine to use the entity API; see the // explanation in block_update_8001(). $block_update_8001 = \Drupal::keyValue('update_backup')->get('block_update_8001', []);