function theme_tinymce_admin_button_table in TinyMCE 6
Same name and namespace in other branches
- 6.2 tinymce.admin.inc \theme_tinymce_admin_button_table()
Layout for the buttons in the tinymce profile form
1 theme call to theme_tinymce_admin_button_table()
- tinymce_profile_form_build in ./
tinymce.admin.inc - Return an HTML form for profile configuration.
File
- ./
tinymce.admin.inc, line 408 - Admin interface for TinyMCE module.
Code
function theme_tinymce_admin_button_table($form) {
$buttons = array();
// Flatten forms array
foreach (element_children($form) as $key) {
$buttons[] = drupal_render($form[$key]);
}
//split checkboxes into rows with 3 columns
$total = count($buttons);
$rows = array();
for ($i = 0; $i < $total; $i++) {
$row = array();
$row[] = array(
'data' => $buttons[$i],
);
$row[] = array(
'data' => $buttons[++$i],
);
$row[] = array(
'data' => $buttons[++$i],
);
$rows[] = $row;
}
$output = theme('table', array(), $rows, array(
'width' => '100%',
));
return $output;
}