function bueditor_check_page in BUEditor 6
Same name and namespace in other branches
- 6.2 bueditor.inc \bueditor_check_page()
- 7 bueditor.inc \bueditor_check_page()
Check if the editor is visible in the page.
1 call to bueditor_check_page()
- bueditor_textarea in ./
bueditor.module - Integrate the editor into textareas.
File
- ./
bueditor.module, line 231
Code
function bueditor_check_page($page, $eid) {
$editor = is_numeric($eid) ? bueditor_editors($eid) : $eid;
if ($editor) {
if (drupal_match_path($page, $editor->pages)) {
return $editor;
}
$alias = drupal_get_path_alias($page);
if ($alias != $page && drupal_match_path($alias, $editor->pages)) {
return $editor;
}
if (arg(0) == 'node' && arg(2) == 'edit') {
$node = node_load(arg(1));
if ($node && strpos($editor->pages, 'node/add/' . $node->type) !== FALSE) {
return $editor;
}
}
}
return FALSE;
}