diff --git a/core/modules/block/custom_block/custom_block.module b/core/modules/block/custom_block/custom_block.module index b8785dee4fd..9273cafde03 100644 --- a/core/modules/block/custom_block/custom_block.module +++ b/core/modules/block/custom_block/custom_block.module @@ -115,28 +115,14 @@ function custom_block_menu() { */ function custom_block_theme($existing, $type, $theme, $path) { return array( - 'custom_block_block' => array( - 'variables' => array('body' => NULL, 'format' => NULL), - ), 'custom_block_add_list' => array( 'variables' => array('content' => NULL), 'file' => 'custom_block.pages.inc', + 'template' => 'custom-block-add-list', ), ); } -/** - * Returns HTML for a custom block. - * - * @ingroup themeable - */ -function theme_custom_block_block($variables) { - $body = $variables['body']; - $format = $variables['format']; - - return check_markup($body, $format); -} - /** * Loads a custom block type. * diff --git a/core/modules/block/custom_block/custom_block.pages.inc b/core/modules/block/custom_block/custom_block.pages.inc index 9c802c4c8a2..297475c6163 100644 --- a/core/modules/block/custom_block/custom_block.pages.inc +++ b/core/modules/block/custom_block/custom_block.pages.inc @@ -10,32 +10,25 @@ use Drupal\custom_block\Plugin\Core\Entity\CustomBlock; use Symfony\Component\HttpFoundation\RedirectResponse; /** - * Returns HTML for a list of available custom block types for block creation. + * Prepares variables for a custom block type creation list templates. * - * @param $variables + * Default template: custom-block-add-list.html.twig. + * + * @param array $variables * An associative array containing: * - content: An array of block types. * * @see custom_block_add_page() - * - * @ingroup themeable */ -function theme_custom_block_add_list($variables) { - $content = $variables['content']; - $output = ''; - - if ($content) { - $output = '