function simplemeta_need_to_inject in Simple Meta 8.2
Check if simplemeta needed to inject into current page.
Return value
bool Needed or not to inject simple meta into the current page.
3 calls to simplemeta_need_to_inject()
- simplemeta_page_attachments in ./
simplemeta.module - Implements hook_page_attachments().
- simplemeta_page_bottom in ./
simplemeta.module - Implements hook_page_bottom().
- simplemeta_preprocess_html in ./
simplemeta.module - Implements hook_preprocess_HOOK().
File
- ./
simplemeta.module, line 221 - Contains simplemeta.module.
Code
function simplemeta_need_to_inject() {
$route = \Drupal::routeMatch()
->getRouteObject();
$isAdmin = \Drupal::service('router.admin_context')
->isAdminRoute($route);
return !$isAdmin;
}