function theme_tinymce_profile_form_buttons in TinyMCE 5
Same name and namespace in other branches
- 5.2 tinymce.module \theme_tinymce_profile_form_buttons()
Layout for the buttons in the tinymce profile form
1 theme call to theme_tinymce_profile_form_buttons()
- tinymce_profile_form_build in ./
tinymce.module - Return an HTML form for profile configuration.
File
- ./
tinymce.module, line 990 - Integrate the TinyMCE editor (http://tinymce.moxiecode.com/) into Drupal.
Code
function theme_tinymce_profile_form_buttons($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;
}