You are here

function fasttoggle_fasttoggle_labels in Fasttoggle 6

Same name and namespace in other branches
  1. 5 fasttoggle.module \fasttoggle_fasttoggle_labels()

Implementation of hook_fasttoggle_labels().

3 calls to fasttoggle_fasttoggle_labels()
fasttoggle_comment_option in ./fasttoggle.toggle.inc
Menu callback. Toggle options for a comment if the action is confirmed via POST. Otherwise, display a confirmation form.
fasttoggle_node_option in ./fasttoggle.toggle.inc
Menu callback. Toggle options for a node if the action is confirmed via POST. Otherwise, display a confirmation form.
fasttoggle_user_option in ./fasttoggle.toggle.inc
Menu callback. Toggle the status of a user if the action is confirmed via POST. Otherwise, display a confirmation form.

File

./fasttoggle.module, line 449
Enables fast toggling of binary or not so binary settings.

Code

function fasttoggle_fasttoggle_labels($style) {
  switch ($style) {
    case FASTTOGGLE_LABEL_ACTION:
      $labels = array(
        'node_status' => array(
          0 => t('publish'),
          1 => t('unpublish'),
        ),
        'node_sticky' => array(
          0 => t('make sticky'),
          1 => t('make unsticky'),
        ),
        'node_promote' => array(
          0 => t('promote'),
          1 => t('demote'),
        ),
        'node_comment' => array(
          0 => t('lock comments'),
          1 => t('unlock comments'),
          2 => t('hide comments'),
        ),
        'user_status' => array(
          0 => t('unblock'),
          1 => t('block'),
        ),
        'comment_status' => array(
          0 => t('unpublish'),
          1 => t('publish'),
        ),
        'role' => array(
          0 => t('add role '),
          1 => t('revoke role '),
        ),
      );
      break;
    default:
      $labels = array(
        'node_status' => array(
          0 => t('not published'),
          1 => t('published'),
        ),
        'node_sticky' => array(
          0 => t('not sticky'),
          1 => t('sticky'),
        ),
        'node_promote' => array(
          0 => t('not promoted'),
          1 => t('promoted'),
        ),
        'node_comment' => array(
          0 => t('comments disabled'),
          1 => t('comments read only'),
          2 => t('comments read/write'),
        ),
        'user_status' => array(
          0 => t('blocked'),
          1 => t('active'),
        ),
        'comment_status' => array(
          0 => t('published'),
          1 => t('not published'),
        ),
        'role' => array(
          0 => t('lacks role '),
          1 => t('has role '),
        ),
      );
      break;
  }
  return $labels;
}