function ckeditor_skin_get_skins in CKEditor Skin 7
Get all ckeditor skins, including all the skins in ckeditor package.
Return value
array All registered skins.
3 calls to ckeditor_skin_get_skins()
- ckeditor_skin_admin_global_profile_form_validate in ./
ckeditor_skin.module - Hack the value to by-pass ckeditor error checking.
- ckeditor_skin_admin_main in ./
ckeditor_skin.module - Override the default admin page to warn the user about missing skin.
- ckeditor_skin_form_ckeditor_admin_global_profile_form_alter in ./
ckeditor_skin.module - Override CKEditor Global Profile form.
File
- ./
ckeditor_skin.module, line 268 - CKEditor Skin
Code
function ckeditor_skin_get_skins() {
static $drupal_static_fast;
if (!isset($drupal_static_fast)) {
$drupal_static_fast['skins'] =& drupal_static(__FUNCTION__);
}
$skins =& $drupal_static_fast['skins'];
if (empty($skins)) {
module_load_include('inc', 'ckeditor', 'includes/ckeditor.lib');
$version = ckeditor_get_version();
$skins = array();
$skin_options = ckeditor_load_skin_options();
$modules = module_implements('ckeditor_skin');
foreach ($modules as $module) {
$items = call_user_func_array($module . '_ckeditor_skin', array(
$version,
));
if (isset($items) && is_array($items)) {
$skins = array_merge($skins, $items);
}
}
drupal_alter('ckeditor_skin', $skins, $version);
// Registered skins.
foreach ($skins as $skin_id => $skin) {
$skins[$skin_id] = $skin + array(
'title' => $skin_id,
'path' => NULL,
'js' => NULL,
);
$skins[$skin_id]['skin'] = $skin_id;
if (!empty($skins[$skin_id]['path'])) {
$skins[$skin_id]['js'] = $skins[$skin_id]['path'] . '/skin.js';
}
}
// Built-in skins.
foreach ($skin_options as $skin_id => $skin_name) {
$skins[$skin_id] = array(
'skin' => $skin_id,
'title' => $skin_name,
'path' => NULL,
'js' => NULL,
);
}
ksort($skins);
}
return $skins;
}