function ckeditor_admin_values_to_settings in CKEditor - WYSIWYG HTML editor 7
Same name and namespace in other branches
- 6 includes/ckeditor.admin.inc \ckeditor_admin_values_to_settings()
Converts an array of form values to a serialized array that does not contain Drupal Form API values
3 calls to ckeditor_admin_values_to_settings()
- ckeditor_admin_global_profile_form_submit in includes/
ckeditor.admin.inc - Submit form for a global profile
- ckeditor_admin_profile_clone_form_submit in includes/
ckeditor.admin.inc - Form submit for a clone profile
- ckeditor_admin_profile_form_submit in includes/
ckeditor.admin.inc - Form submit for a profile
File
- includes/
ckeditor.admin.inc, line 1796 - CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
Code
function ckeditor_admin_values_to_settings($values) {
$plugins = array();
if (isset($values['loadPlugins'])) {
$plugins = $values['loadPlugins'];
}
unset($values['name'], $values['input_formats'], $values['_profile'], $values['op'], $values['submit'], $values['form_build_id'], $values['form_token'], $values['form_id'], $values['loadPlugins']);
// Replace CRLF with LF in toolbar settings
if (isset($values['toolbar'])) {
$values['toolbar'] = str_replace("\r\n", "\n", $values['toolbar']);
}
module_load_include('inc', 'ckeditor', 'includes/ckeditor.lib');
$plugin_list = ckeditor_load_plugins();
$values['loadPlugins'] = array();
if (!empty($plugins)) {
foreach (array_keys($plugins) as $plugin) {
if ($plugins[$plugin] != '0') {
$values['loadPlugins'][$plugin] = $plugin_list[$plugin];
}
}
}
return serialize($values);
}