You are here

function blockreference_field_referenceable_themes in Block reference 7

Field referenceable themes.

2 calls to blockreference_field_referenceable_themes()
blockreference_field_settings_form in ./blockreference.module
Implements hook_field_settings_form().
_blockreference_potential_references_standard in ./blockreference.module
Build an array of all candidate referenced blocks.

File

./blockreference.module, line 118
Defines a field type for referencing a block from a node.

Code

function blockreference_field_referenceable_themes($field) {
  switch ($field['settings']['referenceable_theme']) {
    case 'default':
      return array(
        variable_get('theme_default', 'bartik'),
      );
    case 'all':
      $themes = list_themes();
      return array_keys($themes);
    case 'not_admin':
      $themes = list_themes();
      unset($themes[variable_get('admin_theme', 'seven')]);
      return array_keys($themes);
  }
}