From adc0883f7da6287c3d1779a351c81e2dba585bf7 Mon Sep 17 00:00:00 2001 From: Lily Yan <l26yan@uwaterloo.ca> Date: Tue, 6 Dec 2022 11:10:37 -0500 Subject: [PATCH] ISTWCMS-5878 Remove block.inc file which is related to gesso only --- includes/block.inc | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 includes/block.inc diff --git a/includes/block.inc b/includes/block.inc deleted file mode 100644 index 147c30ca..00000000 --- a/includes/block.inc +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/** - * @file - * Provides the necessary hooks for the block theme suggestions. - */ - -use Drupal\block_content\BlockContentInterface; - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function gesso_theme_suggestions_block_alter(array &$suggestions, array $variables) { - $content = $variables['elements']['content']; - if (isset($content['#block_content']) and $content['#block_content'] instanceof BlockContentInterface) { - $suggestions = []; - $bundle = $content['#block_content']->bundle(); - $view_mode = $content['#view_mode']; - $suggestions[] = 'block__' . $bundle; - $suggestions[] = 'block__' . $view_mode; - $suggestions[] = 'block__' . $bundle . '__' . $view_mode; - if (!empty($variables['elements']['#id'])) { - $suggestions[] = 'block__' . $variables['elements']['#id']; - } - } -} -- GitLab