function views_post_update_exposed_filter_blocks_label_display

Update exposed filter blocks label display to be disabled.

File

core/modules/views/views.post_update.php, line 343

Code

function views_post_update_exposed_filter_blocks_label_display(&$sandbox = NULL) {
    // If Block is not installed, there's nothing to do.
    if (!\Drupal::moduleHandler()->moduleExists('block')) {
        return;
    }
    \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'block', function ($block) {
        
        /** @var \Drupal\block\BlockInterface $block */
        if (strpos($block->getPluginId(), 'views_exposed_filter_block:') === 0) {
            $block->getPlugin()
                ->setConfigurationValue('label_display', '0');
            return TRUE;
        }
        return FALSE;
    });
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.