function _syntaxhighlighter_page_match in Syntax Highlighter 6
Same name and namespace in other branches
- 8 syntaxhighlighter.module \_syntaxhighlighter_page_match()
- 6.2 syntaxhighlighter.module \_syntaxhighlighter_page_match()
- 7.2 syntaxhighlighter.module \_syntaxhighlighter_page_match()
- 7 syntaxhighlighter.module \_syntaxhighlighter_page_match()
1 call to _syntaxhighlighter_page_match()
File
- ./
syntaxhighlighter.module, line 116 - Syntax highlight code using the Syntaxhighlighter javascript library. See http://alexgorbatchev.com/wiki/SyntaxHighlighter
Code
function _syntaxhighlighter_page_match() {
$inject = variable_get('syntaxhighlighter_inject', SYNTAXHIGHLIGHTER_INJECT_EXCEPT_LISTED);
$pages = variable_get('syntaxhighlighter_pages', "admin\nadmin/*\nuser\nuser/*\nimce\nimce/*\n");
if ($inject != SYNTAXHIGHLIGHTER_INJECT_PHP) {
$path = drupal_get_path_alias($_GET['q']);
// Compare with the internal and path alias (if any).
$page_match = drupal_match_path($path, $pages);
if ($path != $_GET['q']) {
$page_match = $page_match || drupal_match_path($_GET['q'], $pages);
}
return !($inject xor $page_match);
}
else {
return drupal_eval($pages);
}
}