function _editor_ckeditor_theme_css in Editor 7
Retrieves the default theme's CKEditor stylesheets defined in the .info file.
Themes may specify iframe-specific CSS files for use with CKEditor by including a "editor_ckeditor_stylesheets" key in the theme .info file.
editor_ckeditor_stylesheets[] = css / ckeditor - iframe . css;
Parameters
string $theme: The theme name from which the "editor_ckeditor_stylesheets" property should be read in the .info files. This theme and all its parent themes will be checked. Defaults to the current front-end theme.
Return value
array An array of all CSS to be added by the theme within the CKEditor.
1 call to _editor_ckeditor_theme_css()
- editor_ckeditor_get_settings in modules/
editor_ckeditor/ editor_ckeditor.module - Editor JS settings callback; Add CKEditor settings to the page for a format.
File
- modules/
editor_ckeditor/ editor_ckeditor.module, line 698 - Adds CKEditor as a supported editor.
Code
function _editor_ckeditor_theme_css($theme = NULL) {
$css = array();
if (!isset($theme)) {
$theme = variable_get('theme_default', 'bartik');
}
if ($theme_path = drupal_get_path('theme', $theme)) {
$info = system_get_info('theme', $theme);
if (isset($info['editor_ckeditor_stylesheets'])) {
$css = $info['editor_ckeditor_stylesheets'];
foreach ($css as $key => $path) {
$css[$key] = $theme_path . '/' . $path;
}
}
if (isset($info['base theme'])) {
$css = array_merge($css, _editor_ckeditor_theme_css($info['base theme']));
}
}
return $css;
}