You are here

function shariff_theme_suggestions_block_alter in Shariff Social Media Buttons 8

Implements hook_theme_suggestions_HOOK_alter().

File

./shariff.module, line 34
Integrating Shariff library, providing settings form and block.

Code

function shariff_theme_suggestions_block_alter(array &$suggestions, array $variables) {

  // Set block_shariff as theme suggestion.
  // We need this because #theme in BlockBase doesn't overwrite block.html.twig.
  if (isset($variables['elements']['#id']) && $variables['elements']['#id'] == 'shariffsocialshare') {
    $suggestions[] = 'block_shariff';
  }
  return $suggestions;
}