function social_post_album_preprocess_field__field_post_comments 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_preprocess_field__field_post_comments()
- 10.0.x modules/social_features/social_post/modules/social_post_album/social_post_album.module \social_post_album_preprocess_field__field_post_comments()
- 10.2.x modules/social_features/social_post/modules/social_post_album/social_post_album.module \social_post_album_preprocess_field__field_post_comments()
Implements hook_preprocess_HOOK().
File
- modules/
social_features/ social_post/ modules/ social_post_album/ social_post_album.module, line 78 - The Social post album module.
Code
function social_post_album_preprocess_field__field_post_comments(&$variables) {
if ($variables['element']['#view_mode'] === 'album' && \Drupal::routeMatch()
->getRouteName() === 'social_post_album.image_popup_render_original' && \Drupal::moduleHandler()
->moduleExists('social_ajax_comments')) {
$variables['attributes']['id'] .= SocialPostAlbumAjaxCommentsController::WRAPPER_ID_SUFFIX;
}
}