You are here

function socialbase_library_info_alter in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 themes/socialbase/socialbase.theme \socialbase_library_info_alter()
  2. 8.5 themes/socialbase/socialbase.theme \socialbase_library_info_alter()
  3. 8.6 themes/socialbase/socialbase.theme \socialbase_library_info_alter()
  4. 8.7 themes/socialbase/socialbase.theme \socialbase_library_info_alter()

Implements hook_library_info_alter().

File

themes/socialbase/socialbase.theme, line 23
The primary PHP file for the Social base theme.

Code

function socialbase_library_info_alter(&$libraries, $extension) {

  // When the social_comment_upload module is enabled we want to load the
  // photoswipe styling with the comment styling.
  if ($extension === 'socialbase' && isset($libraries['comment']) && \Drupal::moduleHandler()
    ->moduleExists('social_comment_upload')) {
    $libraries['comment']['dependencies'][] = 'socialbase/photoswipe-gallery';
    $libraries['comment']['dependencies'][] = 'socialbase/photoswipe.image';
  }
}