function opigno_module_h5p_styles_alter in Opigno module 8
Same name and namespace in other branches
- 3.x opigno_module.module \opigno_module_h5p_styles_alter()
Implements hook_h5p_styles_alter().
File
- ./
opigno_module.module, line 832 - Contains opigno_module.module.
Code
function opigno_module_h5p_styles_alter(&$styles, $libraries, $mode) {
if (isset($mode) && in_array($mode, [
'iframe',
'editor',
])) {
if (!empty($libraries)) {
foreach ($libraries as $library) {
if (!is_array($library) && strpos($library, 'h5p/h5p.coursepresentation-') !== FALSE) {
$styles[] = (object) [
'path' => drupal_get_path('module', 'opigno_module') . '/css/h5p_course_presentation.css',
'version' => '?ver=1.0.0',
];
break;
}
}
}
}
}