You are here

function skinr_library_info_build in Skinr 8.2

Implements hook_library_info_build().

File

./skinr.module, line 72
Handles core Skinr functionality.

Code

function skinr_library_info_build() {
  $skin_infos = skinr_get_skin_info();
  $libraries = [];
  foreach ($skin_infos as $skin_name => $skin_info) {
    $path = base_path() . $skin_info['source']['path'] . '/';
    if (!empty($skin_info['attached'])) {
      $libraries['skinr.' . $skin_name] = _skinr_attached_to_library($skin_info['attached'], $path);
    }
    foreach ($skin_info['options'] as $option => &$data) {
      if (!empty($data['attached'])) {
        $libraries['skinr.' . $skin_name . '.' . $option] = _skinr_attached_to_library($data['attached'], $path);
      }
    }
  }
  return $libraries;
}