function pagestyle_block_form_options in Page Style 7
Same name and namespace in other branches
- 5 includes/pagestyle.block.inc \pagestyle_block_form_options()
- 6 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
1 call to pagestyle_block_form_options()
- pagestyle_form in includes/
pagestyle.block.inc - Implement hook_form().
File
- includes/
pagestyle.block.inc, line 226 - 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(
'black_white' => array(
'class' => 'black_white',
'name' => t('Black/White'),
'display' => $pagestyle_black_white,
),
'white_black' => array(
'class' => 'white_black',
'name' => t('White/Black'),
'display' => $pagestyle_white_black,
),
'yellow_blue' => array(
'class' => 'yellow_blue',
'name' => t('Yellow/Blue'),
'display' => $pagestyle_yellow_blue,
),
'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;
}