function _css_editor_get_stylesheet in CSS Editor 8
Get the Custom CSS generated file for a theme.
Parameters
$theme: The machine name of the current theme.
Return value
string|bool
2 calls to _css_editor_get_stylesheet()
- css_editor_library_info_alter in ./
css_editor.module - Implements hook_library_info_alter().
- css_editor_page_attachments in ./
css_editor.module - Implements hook_page_attachments().
File
- ./
css_editor.module, line 144 - Allows users to apply customized CSS to themes.
Code
function _css_editor_get_stylesheet($theme) {
$config = \Drupal::config('css_editor.theme.' . $theme);
$file = $config
->get('path');
if ($config
->get('enabled') && file_exists($file)) {
return $file;
}
else {
return FALSE;
}
}