function social_post_album_theme_suggestions_field_alter in Open Social 10.1.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_post/modules/social_post_album/social_post_album.module \social_post_album_theme_suggestions_field_alter()
- 10.0.x modules/social_features/social_post/modules/social_post_album/social_post_album.module \social_post_album_theme_suggestions_field_alter()
- 10.2.x modules/social_features/social_post/modules/social_post_album/social_post_album.module \social_post_album_theme_suggestions_field_alter()
Implements hook_theme_suggestions_HOOK_alter().
File
- modules/
social_features/ social_post/ modules/ social_post_album/ social_post_album.module, line 129 - The Social post album module.
Code
function social_post_album_theme_suggestions_field_alter(array &$suggestions, array $variables) {
$element = $variables['element'];
if ($element['#field_name'] === 'field_post_image') {
$suggestions[] = 'field__' . $element['#entity_type'] . '__type__' . $element['#field_type'] . '__album';
}
return $suggestions;
}