function ckeditor_default_skin in CKEditor - WYSIWYG HTML editor 7
Same name and namespace in other branches
- 6 includes/ckeditor.lib.inc \ckeditor_default_skin()
Return default skin for CKEditor
Return value
string
3 calls to ckeditor_default_skin()
- ckeditor_admin_global_profile_form in includes/
ckeditor.admin.inc - Form builder for a global profile
- ckeditor_admin_profile_form in includes/
ckeditor.admin.inc - Form builder for a profile
- ckeditor_profile_settings_compile in includes/
ckeditor.lib.inc - Compile settings of profile
File
- includes/
ckeditor.lib.inc, line 201 - CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
Code
function ckeditor_default_skin() {
$skin_options = ckeditor_load_skin_options();
// Return default skin for used CKEditor version
$version = explode('.', ckeditor_get_version());
if ($version[0] == 3 && array_key_exists('kama', $skin_options)) {
return 'kama';
}
elseif ($version[0] == 4 && $version[1] <= 5 && array_key_exists('moono', $skin_options)) {
return 'moono';
}
// Check if default skin is in options
if (array_key_exists('moono-lisa', $skin_options)) {
return 'moono-lisa';
}
// If there are no defaults, or only one skin, select the first from the list.
return key($skin_options);
}