You are here

function bueditor_import_by_name in BUEditor 6.2

Same name and namespace in other branches
  1. 7 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 946

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;
}