You are here

function fasttoggle_fasttoggle_labels in Fasttoggle 5

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

Implementation of hook_fasttoggle_labels().

File

./fasttoggle.module, line 564
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'),
        ),
        'comment_admin' => 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'),
        ),
      );
      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'),
        ),
        'comment_admin' => 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'),
        ),
      );
      break;
  }
  return $labels;
}