You are here

function audiofield_theme_suggestions_audioplayer_alter in AudioField 8

Implements hook_theme_suggestions_HOOK_alter().

File

./audiofield.module, line 83
Drupal Module: Audiofield.

Code

function audiofield_theme_suggestions_audioplayer_alter(array &$suggestions, array $variables) {

  // Suggest a template using the plugin name.
  $suggestions[] = 'audioplayer__' . $variables['plugin_id'];

  // Suggest a template with the plugin/theme name if it exists.
  if (!empty($variables['plugin_theme'])) {
    $suggestions[] = 'audioplayer__' . $variables['plugin_id'] . '__' . $variables['plugin_theme'];
  }
}