Skip to content

Instantly share code, notes, and snippets.

@Oleksii909
Last active November 14, 2020 10:21
Show Gist options
  • Select an option

  • Save Oleksii909/fa9b1eb563a199836bb53aac17a45199 to your computer and use it in GitHub Desktop.

Select an option

Save Oleksii909/fa9b1eb563a199836bb53aac17a45199 to your computer and use it in GitHub Desktop.
@trigger_error('Support for IE Conditional Comments is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3102997', E_USER_DEPRECATED);
<?php
$tags['link'] = [HtmlTag::preRenderConditionalComments($element), '<link />' . "\n"];
// Conditional link.
$element = [
'#tag' => 'link',
'#browsers' => [
'IE' => TRUE,
'!IE' => FALSE,
],
];
$tags['conditional-link'] = [HtmlTag::preRenderConditionalComments($element), "\n" . '<!--[if IE]>' . "\n" . '<link />' . "\n" . '<![endif]-->' . "\n"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment