Skip to content

Commit

Permalink
Support D9 change where rel is no longer 'shortcut icon' and is just …
Browse files Browse the repository at this point in the history
…'icon'.
  • Loading branch information
jacerider committed Dec 14, 2021
1 parent 54cc828 commit c836cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion real_favicon.module
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function real_favicon_page_attachments_alter(array &$attachments) {
foreach ($attachments['#attached']['html_head_link'] as $i => $item) {
if (!empty($item) && is_array($item)) {
foreach ($item as $ii => $iitem) {
if (isset($iitem['rel']) && $iitem['rel'] == 'shortcut icon') {
if (isset($iitem['rel']) && in_array($iitem['rel'], ['shortcut icon', 'icon'])) {
unset($attachments['#attached']['html_head_link'][$i][$ii]);
}
}
Expand Down

0 comments on commit c836cc5

Please sign in to comment.