You are here

function _ckeditor_script_path in CKEditor - WYSIWYG HTML editor 6

Same name and namespace in other branches
  1. 7 includes/ckeditor.lib.inc \_ckeditor_script_path()
2 calls to _ckeditor_script_path()
ckeditor_install in ./ckeditor.install
_ckeditor_requirements_isinstalled in includes/ckeditor.lib.inc
Determines whether the CKEditor sources are present

File

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

Code

function _ckeditor_script_path() {
  $jspath = FALSE;
  $module_path = drupal_get_path('module', 'ckeditor');
  if (file_exists($module_path . '/ckeditor/ckeditor.js')) {
    $jspath = '%m/ckeditor';
  }
  elseif (file_exists($module_path . '/ckeditor/ckeditor/ckeditor.js')) {
    $jspath = '%m/ckeditor/ckeditor';
  }
  elseif (file_exists('sites/all/libraries/ckeditor/ckeditor.js')) {
    $jspath = '%b/sites/all/libraries/ckeditor';
  }
  return $jspath;
}