You are here

function blocktheme_get_blockthemes in Block Theme 6

Same name and namespace in other branches
  1. 8 blocktheme.module \blocktheme_get_blockthemes()
  2. 7 blocktheme.module \blocktheme_get_blockthemes()

Get the defined blockthemes and return an array to be used in a select list.

3 calls to blocktheme_get_blockthemes()
blocktheme_form_block_add_block_form_alter in ./blocktheme.module
Form for adding a new block.
blocktheme_form_block_admin_configure_alter in ./blocktheme.module
Form for updating a block.
blocktheme_preprocess_block_admin_display_form in ./blocktheme.module
Implementation of template_preprocess_block_admin_display_form().

File

./blocktheme.module, line 228
Provides a configuration option to select custom themes for blocks

Code

function blocktheme_get_blockthemes() {
  $options = array();
  $blockthemes = variable_get('blocktheme_themes', '');
  $options[] = t('- None -');
  if ($blockthemes) {
    $_sets = explode("\n", $blockthemes);
    foreach ($_sets as $key => $value) {
      $set = explode('|', $value);
      $options[$set[0]] = $set[1];
    }
  }
  return $options;
}