You are here

function bueditor_grab_imported_buttons in BUEditor 7

Same name and namespace in other branches
  1. 6.2 admin/bueditor.admin.inc \bueditor_grab_imported_buttons()

Grab buttons from an imported editor data.

2 calls to bueditor_grab_imported_buttons()
bueditor_button_import_submit in admin/bueditor.admin.inc
Button import form submission.
bueditor_save_import in admin/bueditor.admin.inc
Save imported editor data. Save icons and library files into specified editor path.

File

admin/bueditor.admin.inc, line 762

Code

function bueditor_grab_imported_buttons($editor) {
  $buttons = array();
  if (!isset($editor->buttons) || !is_array($editor->buttons) || empty($editor->buttons)) {
    return $buttons;
  }
  foreach ($editor->buttons as $button) {
    if (isset($button['title']) && $button['title']) {
      $buttons[] = (object) $button;
    }
  }
  return $buttons;
}