You are here

function pagestyle_block_form_options in Page Style 5

Same name and namespace in other branches
  1. 6 includes/pagestyle.block.inc \pagestyle_block_form_options()
  2. 7 includes/pagestyle.block.inc \pagestyle_block_form_options()

Returns an array of available values for the select element in the block page style.

Return value

An array of available values, for selecting the page style.

See also

pagestyle_form()

1 call to pagestyle_block_form_options()
pagestyle_form in includes/pagestyle.block.inc
Implement hook_form().

File

includes/pagestyle.block.inc, line 211
Block, page and theme functions.

Code

function pagestyle_block_form_options() {
  $pagestyle_black_white = variable_get('pagestyle_black_white', 1);
  $pagestyle_white_black = variable_get('pagestyle_white_black', 1);
  $pagestyle_yellow_blue = variable_get('pagestyle_yellow_blue', 1);
  $pagestyle_standard = variable_get('pagestyle_standard', 1);
  $ps_options = array(
    $var['black_white'] = array(
      'class' => 'black_white',
      'name' => t('Black/White'),
      'display' => $pagestyle_black_white,
    ),
    $var['white_black'] = array(
      'class' => 'white_black',
      'name' => t('White/Black'),
      'display' => $pagestyle_white_black,
    ),
    $var['yellow_blue'] = array(
      'class' => 'yellow_blue',
      'name' => t('Yellow/Blue'),
      'display' => $pagestyle_yellow_blue,
    ),
    $var['standard'] = array(
      'class' => 'standard',
      'name' => t('Standard'),
      'display' => $pagestyle_standard,
    ),
  );
  $options = array();
  foreach ($ps_options as $name) {
    if ($name['display'] == 1) {
      $options[$name['class']] = $name['name'];
    }
  }
  return $options;
}