Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save frederickjh/db96fc1bb2facb05cc17 to your computer and use it in GitHub Desktop.
Save frederickjh/db96fc1bb2facb05cc17 to your computer and use it in GitHub Desktop.
Code from slide 49 of "Tailor your backend to meet the clients needs" - move the moderation state to the actions region
<?php
/** Text from slide 49 of "Tailor your backend to meet the clients needs"
* http://www.slideshare.net/stevenvdhout/durable-drupal-backend
* move the moderation state to the actions region
**/
$form['revision_information']['#collapsed'] = TRUE;
if (isset($form['revision_information']['workbench_moderation_state_new'])) {
$form['actions']['workbench_moderation_state_new'] = $form['revision_information']['workbench_moderation_state_new'];
unset($form['revision_information']['workbench_moderation_state_new']);
}
if (isset($form['options']['workbench_moderation_state_new'])) {
$form['actions']['workbench_moderation_state_new'] = $form['options']['workbench_moderation_state_new'];
unset($form['options']['workbench_moderation_state_new']);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment