function _syntaxhighlighter_get_lib_location in Syntax Highlighter 7
Same name and namespace in other branches
- 6.2 syntaxhighlighter.module \_syntaxhighlighter_get_lib_location()
- 6 syntaxhighlighter.module \_syntaxhighlighter_get_lib_location()
- 7.2 syntaxhighlighter.module \_syntaxhighlighter_get_lib_location()
Return value
the directory path where the syntaxhighlighter js lib is installed, NULL if not found
3 calls to _syntaxhighlighter_get_lib_location()
- syntaxhighlighter_init in ./
syntaxhighlighter.module - syntaxhighlighter_requirements in ./
syntaxhighlighter.install - Make sure the user has installed the 'SyntaxHighlighter' library the side effect of this is to rescan the javascript lib location
- syntaxhighlighter_settings_form in ./
syntaxhighlighter.admin.inc - An admin form to specify which language to support for highlighting
File
- ./
syntaxhighlighter.module, line 337 - Syntax highlight code using the Syntaxhighlighter javascript library. See http://alexgorbatchev.com/wiki/SyntaxHighlighter
Code
function _syntaxhighlighter_get_lib_location() {
$result = variable_get('syntaxhighlighter_lib_location', NULL);
if (!$result) {
$result = _syntaxhighlighter_scan_lib_location();
variable_set('syntaxhighlighter_lib_location', $result);
// library location may have changed, recreate the setup script if the lib
// is found
if ($result) {
_syntaxhighlighter_setup_autoloader_script();
}
}
return $result;
}