<?php

/**
 * @file
 * Chaos Tools Blocks.
 */

/**
 * Remove ctools block from appearing on viewable block types.
 *
 * In general, users should be using the core block types instead.
 */
function ctools_block_plugin_filter_block_alter(array &$definitions, array $extra, $consumer) {
  if ($consumer == 'layout_builder') {
    foreach ($definitions as $label => $definition) {
      if ($definition['provider'] == 'ctools_block') {
        unset($definitions[$label]);
      }
    }
  }
}
