function bueditor_import_by_name in BUEditor 7
Same name and namespace in other branches
- 6.2 admin/bueditor.admin.inc \bueditor_import_by_name()
Import an editor from 'bueditor/import' directory.
2 calls to bueditor_import_by_name()
- bueditor_eop_add_default in admin/
bueditor.admin.inc - Editor add_default operation.
- bueditor_import_all in admin/
bueditor.admin.inc - Import all from 'bueditor/import' directory.
File
- admin/
bueditor.admin.inc, line 1052
Code
function bueditor_import_by_name($name, $ename = '') {
$file = drupal_get_path('module', 'bueditor') . '/import/' . $name . '.bueditor.txt';
if ($code = file_get_contents($file)) {
if ($editor = bueditor_exec_editor_code($code)) {
if ($ename) {
$editor->name = $ename;
}
return bueditor_save_import($editor);
}
}
return FALSE;
}