function _inline_entity_form_attach_css in Inline Entity Form 7
Attaches theme specific CSS files.
Parameters
$theme_css: An array of all CSS files that should be considered.
$css: The $form['#attached']['css'] array, modified by reference.
1 call to _inline_entity_form_attach_css()
- inline_entity_form_field_widget_form in ./
inline_entity_form.module - Implements hook_field_widget_form().
File
- ./
inline_entity_form.module, line 177 - Provides a widget for inline management (creation, modification, removal) of referenced entities. The primary use case is the parent -> children one (for example, order -> line items), where the child entities are never managed outside the…
Code
function _inline_entity_form_attach_css($theme_css, &$css) {
if (empty($theme_css)) {
return;
}
// Add the base CSS file, if provided.
if (!empty($theme_css['base'])) {
$css[] = $theme_css['base'];
}
// Add the theme specific CSS file, if provided.
$theme_key = $GLOBALS['theme'];
if (!empty($theme_css[$theme_key])) {
$css[] = $theme_css[$theme_key];
}
}