You are here

function ckeditor_library_path in CKEditor - WYSIWYG HTML editor 7

Generate library path of the Drupal installation.

Return value

Path of library in the Drupal installation.

6 calls to ckeditor_library_path()
ckeditor_admin_global_profile_form in includes/ckeditor.admin.inc
Form builder for a global profile
ckeditor_path in ./ckeditor.module
Read the CKEditor path from the Global profile.
ckeditor_plugins_path in ./ckeditor.module
Read the CKEditor plugins path from the Global profile.
ckeditor_skins_path in ./ckeditor.module
Read the CKEditor skins path from the Global profile.
ckfinder_path in ./ckeditor.module
Read the CKFinder path from the Global profile.

... See full list

File

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

Code

function ckeditor_library_path($mode = 'relative') {
  $lib_path = 'sites/all/libraries';
  if (function_exists('libraries_get_path')) {
    $path = libraries_get_path('ckeditor');
    if ($path !== FALSE) {
      $lib_path = drupal_substr($path, 0, strlen($path) - 9);
    }
  }
  switch ($mode) {
    default:
    case 'relative':
      return ckeditor_base_path('relative') . '/' . $lib_path;
    case 'local':
      return ckeditor_base_path('local') . '/' . $lib_path;
    case 'url':
      return $lib_path;
  }
}