function bueditor_exportable_buttons in BUEditor 7
Same name and namespace in other branches
- 6.2 admin/bueditor.admin.inc \bueditor_exportable_buttons()
Make buttons exportable by converting them into arrays.
2 calls to bueditor_exportable_buttons()
- bueditor_export_buttons in admin/
bueditor.admin.inc - Export buttons using var_export. The genarated code can also be imported as an editor.
- bueditor_varexport_editor in admin/
bueditor.admin.inc - Generate an importable editor string including icon and library files.
File
- admin/
bueditor.admin.inc, line 887
Code
function bueditor_exportable_buttons($buttons) {
$new_buttons = array();
if (is_array($buttons)) {
foreach ($buttons as $bid => $button) {
unset($button->bid, $button->eid);
$new_buttons[] = (array) $button;
}
}
return $new_buttons;
}