You are here

function ckeditor_is_enabled in CKEditor - WYSIWYG HTML editor 6

Parameters

int $excl_mode 1/include, exclude otherwise:

string $excl_regex paths (drupal paths with ids attached):

string $element_id current ID:

string $get_q current path:

Return value

boolean returns true if CKEditor is enabled

3 calls to ckeditor_is_enabled()
ckeditor_get_settings in ./ckeditor.module
ckeditor_process_textarea in ./ckeditor.module
This function creates the HTML objects required for CKEditor.
ckeditor_user_get_profile in includes/ckeditor.lib.inc

File

includes/ckeditor.lib.inc, line 594
CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.

Code

function ckeditor_is_enabled($excl_mode, $excl_regex, $element_id, $get_q) {
  global $theme;
  $front = variable_get('site_frontpage', 'node');
  $excl_regex = str_replace('<front>', $front, $excl_regex);
  $nodetype = ckeditor_get_nodetype($get_q);
  $element_id = str_replace('.', '\\.', $element_id);
  $match = !empty($excl_regex) && preg_match($excl_regex, $theme . ':' . $nodetype . '@' . $get_q . '.' . $element_id);
  return $excl_mode == '0' xor $match;
}