You are here

function audiofield_theme_registry_alter in AudioField 8

Implements hook_theme_registry_alter().

File

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

Code

function audiofield_theme_registry_alter(&$theme_registry) {

  /*
   * By default, Drupal 8 does not include theme suggestions from inside the
   * module in which they were created, so we must add them manually here.
   */
  $path = drupal_get_path('module', 'audiofield');
  $audioplayer_templates = drupal_find_theme_templates($theme_registry, '.html.twig', $path);
  foreach ($audioplayer_templates as &$audioplayer_template) {
    $audioplayer_template['type'] = 'module';
  }
  $theme_registry += $audioplayer_templates;
}