function _better_revisions_options in Better Revisions 7
Same name and namespace in other branches
- 8 better_revisions.module \_better_revisions_options()
1 call to _better_revisions_options()
File
- ./
better_revisions.module, line 171 - Main enhanced revisions module file.
Code
function _better_revisions_options() {
$opts = variable_get('br_list_options', BF_DEFAULT_OPTS);
$options = explode("\n", $opts);
$options_array = array(
'' => t('Please select'),
);
foreach ($options as $option) {
$option = trim($option);
$matches = array();
if (preg_match('/(.*)\\|(.*)/', $option, $matches)) {
$options_array[$matches[1]] = $matches[2];
}
else {
$options_array[$option] = $option;
}
}
return $options_array;
}