You are here

function _outdatedbrowser_is_active in Outdated Browser 8

Checks if library should be included in current page request.

Return value

boolean TRUE, if library should be included in current page request, FALSE otherwise.

2 calls to _outdatedbrowser_is_active()
outdatedbrowser_page_attachments in ./outdatedbrowser.module
Implements hook_page_attachments().
outdatedbrowser_page_bottom in ./outdatedbrowser.module
Implements hook_page_bottom().

File

./outdatedbrowser.module, line 90
Outdated Browser module file.

Code

function _outdatedbrowser_is_active() {
  $show = TRUE;
  if (InstallerKernel::installationAttempted()) {
    $show = FALSE;
  }
  elseif (\Drupal::service('router.admin_context')
    ->isAdminRoute(\Drupal::routeMatch()
    ->getRouteObject())) {

    // Hide on admin pages.
    $show = FALSE;
  }
  return $show;
}