You are here

function emfield_provider_themes in Embedded Media Field 6.2

Same name and namespace in other branches
  1. 6.3 deprecated/emfield-deprecated.inc \emfield_provider_themes()
  2. 6 emfield.module \emfield_provider_themes()

Allow providers to create their own themes.

@TODO: Remove this once we've moved all providers outside emfield, as their wrapping modules can use standard Drupal hooks.

2 calls to emfield_provider_themes()
emaudio_theme in contrib/emaudio/emaudio.module
Impelements hook_theme().
emvideo_theme in contrib/emvideo/emvideo.module
Implementation of hook_theme().

File

./emfield.module, line 763
Embedded Media Field is a CCK-based framework for 3rd party media files.

Code

function emfield_provider_themes($module, $provider = NULL) {
  $themes = array();
  if ($provider && ($subthemes = emfield_include_invoke($module, $provider, 'subtheme'))) {
    $themes = $subthemes;
  }
  $providers = emfield_system_list($module);
  foreach ($providers as $provider) {
    if ($subthemes = emfield_include_invoke($module, $provider->name, 'emfield_subtheme')) {
      $themes += $subthemes;
    }
  }
  return $themes;
}