function social_media_links_preprocess_block in Social Media Links Block and Field 8.2
Implements hook_preprocess_HOOK() for block.html.twig.
File
- ./
social_media_links.module, line 41 - Allows to add a block with the links to various social media platforms.
Code
function social_media_links_preprocess_block(&$variables) {
if ($variables['plugin_id'] === 'social_media_links_block') {
// Ensure that the css class "block-social-media-links" always exist,
// no mather was theme is used. Because our styles use this class.
$variables['attributes']['class'][] = 'block-social-media-links';
}
}