function ckeditor_user_get_setting in CKEditor - WYSIWYG HTML editor 6
Same name and namespace in other branches
- 7 includes/ckeditor.lib.inc \ckeditor_user_get_setting()
1 call to ckeditor_user_get_setting()
- ckeditor_process_textarea in ./
ckeditor.module - This function creates the HTML objects required for CKEditor.
File
- includes/
ckeditor.lib.inc, line 488 - CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
Code
function ckeditor_user_get_setting($user, $profile, $setting) {
$default = array(
'default' => 't',
'show_toggle' => 't',
'popup' => 'f',
'toolbar' => 'default',
'width' => '100%',
'lang' => 'en',
'auto_lang' => 't',
);
if ($profile->settings['allow_user_conf']) {
$status = isset($user->{'ckeditor_' . $setting}) ? $user->{'ckeditor_' . $setting} : (isset($profile->settings[$setting]) ? $profile->settings[$setting] : $default[$setting]);
}
else {
$status = isset($profile->settings[$setting]) ? $profile->settings[$setting] : $default[$setting];
}
return $status;
}