function ckeditor_profiles_compile in CKEditor - WYSIWYG HTML editor 7
Compile settings of all profiles at returns is as array
Parameters
string $input_format:
boolean $clear:
Return value
array
2 calls to ckeditor_profiles_compile()
- ckeditor_load_by_field in includes/
ckeditor.lib.inc  - Load CKEditor for field ID
 - ckeditor_pre_render_text_format in ./
ckeditor.module  - This function creates the HTML objects required for CKEditor.
 
File
- includes/
ckeditor.lib.inc, line 549  - CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
 
Code
function ckeditor_profiles_compile($input_format = FALSE, $clear = FALSE) {
  static $compiled = FALSE;
  static $_ckeditor_compiled = array();
  if ($clear !== FALSE && $compiled !== FALSE) {
    $compiled = FALSE;
  }
  if ($compiled === TRUE) {
    return $input_format === FALSE ? $_ckeditor_compiled : (isset($_ckeditor_compiled[$input_format]) ? $_ckeditor_compiled[$input_format] : array());
  }
  $global_profile = ckeditor_profile_load('CKEditor Global Profile');
  $profiles_list = ckeditor_profile_input_formats();
  foreach ($profiles_list as $_profile => $_inputs) {
    $profile = ckeditor_profile_load($_profile);
    $setting = ckeditor_profile_settings_compile($global_profile, $profile);
    foreach ($_inputs as $_input) {
      $_ckeditor_compiled[$_input] = $setting;
    }
  }
  $compiled = TRUE;
  return $input_format === FALSE ? $_ckeditor_compiled : $_ckeditor_compiled[$input_format];
}