Unverified Commit 39777109 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2607116 by rajeshwari10, rakesh.gectcr, andypost, mayurjadhav, ZeiP,...

Issue #2607116 by rajeshwari10, rakesh.gectcr, andypost, mayurjadhav, ZeiP, alexpott, xjm: Unused variable in token.api.php
parent 29397a9f
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -149,16 +149,6 @@ function hook_tokens($type, $tokens, array $data, array $options, \Drupal\Core\R
 * @see hook_tokens()
 */
function hook_tokens_alter(array &$replacements, array $context, \Drupal\Core\Render\BubbleableMetadata $bubbleable_metadata) {
  $options = $context['options'];

  if (isset($options['langcode'])) {
    $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']);
    $langcode = $options['langcode'];
  }
  else {
    $langcode = NULL;
  }

  if ($context['type'] == 'node' && !empty($context['data']['node'])) {
    $node = $context['data']['node'];