You are here

function automatic_updates_9_3_shim_page_top in Automatic Updates 8.2

Implements hook_page_top().

File

automatic_updates_9_3_shim/automatic_updates_9_3_shim.module, line 11
Contains hook implementations for Automatic Updates 9.3 shim module.

Code

function automatic_updates_9_3_shim_page_top() {

  // @todo Rely on the route option after https://www.drupal.org/i/3236497 is
  //   committed.
  // @todo Remove 'system.batch_page.html' after
  //   https://www.drupal.org/i/3238311 is committed.
  $skip_routes = [
    'system.batch_page.html',
    'automatic_updates.confirmation_page',
    'automatic_updates.report_update',
    'automatic_updates.module_update',
  ];
  $route_name = \Drupal::routeMatch()
    ->getRouteName();
  if (!in_array($route_name, $skip_routes, TRUE) && function_exists('update_page_top')) {
    update_page_top();
  }
}