You are here

function ckeditor_admin_values_to_settings in CKEditor - WYSIWYG HTML editor 6

Same name and namespace in other branches
  1. 7 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
ckeditor_admin_profile_clone_form_submit in includes/ckeditor.admin.inc
ckeditor_admin_profile_form_submit in includes/ckeditor.admin.inc

File

includes/ckeditor.admin.inc, line 1942
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['rids'], $values['_profile'], $values['op'], $values['submit'], $values['form_build_id'], $values['form_token'], $values['form_id'], $values['loadPlugins']);
  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);
}