You are here

function fontawesome_theme_registry_alter in Font Awesome Icons 8.2

Implements hook_theme_registry_alter().

File

./fontawesome.module, line 324
Drupal integration with Font Awesome, the iconic font for use with Bootstrap.

Code

function fontawesome_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', 'fontawesome');
  $fontawesome_templates = drupal_find_theme_templates($theme_registry, '.html.twig', $path);
  foreach ($fontawesome_templates as &$fontawesome_template) {
    $fontawesome_template['type'] = 'module';
  }
  $theme_registry += $fontawesome_templates;
}