From dc2fae46d7440a8f0a7f46ed997bdecf60c3e572 Mon Sep 17 00:00:00 2001 From: chmez Date: Sun, 24 Jun 2018 21:51:02 +0300 Subject: [PATCH] Revert "Issue #11: Used default theme favicon instead of administrative theme favicon." This reverts commit 4a9d9ac53e22f3ce51060d3fd1ded029be3059ca. --- d8.profile | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/d8.profile b/d8.profile index 0f12a3ac3..257f43d12 100644 --- a/d8.profile +++ b/d8.profile @@ -5,7 +5,6 @@ * Basis for the site on Drupal 8. */ -use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Database\Database; use Drupal\Core\Url; @@ -40,24 +39,3 @@ function _d8_user_login_form_submit(array &$form, FormStateInterface $form_state $form_state->setRedirectUrl(Url::fromUserInput($path)); } } - -/** - * Implements hook_page_attachments_alter(). - */ -function d8_page_attachments_alter(array &$attachments) { - $theme = \Drupal::config('system.theme')->get('default'); - - if ($theme != \Drupal::theme()->getActiveTheme()->getName() && theme_get_setting('features.favicon') && !empty($attachments['#attached']['html_head_link']) && is_array($attachments['#attached']['html_head_link'])) { - foreach ($attachments['#attached']['html_head_link'] as &$links) { - if (!empty($links) && is_array($links)) { - foreach ($links as &$link) { - if (!empty($link) && is_array($link) && !empty($link['rel']) && $link['rel'] == 'shortcut icon' && !empty($link['type']) && $link['type'] == theme_get_setting('favicon.mimetype') && !empty($link['href'])) { - $favicon = theme_get_setting('favicon.url', $theme); - $link['href'] = UrlHelper::stripDangerousProtocols($favicon); - return; - } - } - } - } - } -}