You are here

function mb_save_button_positions in More Buttons 7

Provide the button position options.

Options are usable for the buttons:

  • Save and continue
  • Save and create new.

Parameters

string $module: The shortcut name of the MB sub module. Values: mb_content, mb_comment, mb_user

Return value

array

3 calls to mb_save_button_positions()
mb_content_admin in mb_content/mb_content.admin.inc
Provides the central MB Content settings form.
mb_content_form_alter in mb_content/mb_content.module
Implements hook_form_alter().
mb_user_admin in mb_user/mb_user.admin.inc
Provides the MB User settings form.

File

mb/mb.module, line 253
The More Buttons (MB) module allows to use additional buttons with Drupal.

Code

function mb_save_button_positions($module) {
  switch ($module) {
    case 'mb_content':
    case 'mb_comment':
      $options = array(
        0 => t('None'),
        1 => t('Left of Save'),
        2 => t('Right of Save'),
      );
      break;
    case 'mb_user':

      // The MB user module use two buttons to save.
      // The + allow the different positions
      // - further to the right
      // - further to the left.
      $options = array(
        0 => t('None'),
        1 => t('Left of Save'),
        2 => t('Left + of Save'),
        3 => t('Right of Save'),
        4 => t('Right + of Save'),
      );
      break;
  }
  return $options;
}