You are here

function opigno_calendar_preprocess_page_title in Opigno calendar 8

Same name and namespace in other branches
  1. 3.x opigno_calendar.module \opigno_calendar_preprocess_page_title()

Implements hook_preprocess_page_title().

File

./opigno_calendar.module, line 337
Contains opigno_calendar.module.

Code

function opigno_calendar_preprocess_page_title(&$variables) {
  if (\Drupal::routeMatch()
    ->getRouteName() == 'view.opigno_calendar.page_month') {
    $variables['title']['#allowed_tags'][] = 'span';
    $variables['title']['#markup'] = '<span class="sr-only">' . $variables['title']['#markup'] . '</span>';
  }
}