You are here

function cpn_codemirror in Code per Node 6

Same name and namespace in other branches
  1. 7 cpn.module \cpn_codemirror()

Returns path to CodeMirror, or FALSE if not found.

2 calls to cpn_codemirror()
cpn_after_build in ./cpn.module
"#after_build" function which adds syntax highlighting. See http://drupal.org/node/322290.
cpn_settings in ./cpn.admin.inc
Settings form.

File

./cpn.module, line 469
Primary hook implementations.

Code

function cpn_codemirror() {
  if (module_exists('libraries')) {
    $path = libraries_get_path('codemirror');
  }
  else {
    $path = 'sites/all/libraries/codemirror';
  }
  return file_exists($path) ? $path : FALSE;
}