Loading inc/theme.inc +7 −1 Changes for inc/theme.inc: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -10,9 +10,15 @@ */ function zurb_foundation_theme_suggestions_alter(&$suggestions, $variables, $hook) { if ($hook == 'menu' || $hook == 'block') { // Add cached for getVisibleBlocksPerRegion because this doesn't happen in // core this can be removed once // https://www.drupal.org/project/drupal/issues/2479459 is resolved. $all_blocks = &drupal_static(__FUNCTION__, []); if (empty($all_blocks)) { $all_blocks = \Drupal::service('block.repository')->getVisibleBlocksPerRegion(); } // For menu blocks, check to see if the menu block is placed in an // off-canvas region, and if so use our custom template. $all_blocks = \Drupal::service('block.repository')->getVisibleBlocksPerRegion(); $off_canvas_blocks = []; if (!empty($all_blocks['left_off_canvas'])) { $off_canvas_blocks += $all_blocks['left_off_canvas']; Loading Loading
inc/theme.inc +7 −1 Changes for inc/theme.inc: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -10,9 +10,15 @@ */ function zurb_foundation_theme_suggestions_alter(&$suggestions, $variables, $hook) { if ($hook == 'menu' || $hook == 'block') { // Add cached for getVisibleBlocksPerRegion because this doesn't happen in // core this can be removed once // https://www.drupal.org/project/drupal/issues/2479459 is resolved. $all_blocks = &drupal_static(__FUNCTION__, []); if (empty($all_blocks)) { $all_blocks = \Drupal::service('block.repository')->getVisibleBlocksPerRegion(); } // For menu blocks, check to see if the menu block is placed in an // off-canvas region, and if so use our custom template. $all_blocks = \Drupal::service('block.repository')->getVisibleBlocksPerRegion(); $off_canvas_blocks = []; if (!empty($all_blocks['left_off_canvas'])) { $off_canvas_blocks += $all_blocks['left_off_canvas']; Loading