Loading modules/social_features/social_user/social_user.tokens.inc +8 −16 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ */ use Drupal\Core\Render\BubbleableMetadata; use Drupal\message\Entity\Message; /** * Implements hook_token_info(). Loading Loading @@ -36,16 +35,10 @@ function social_user_token_info() { function social_user_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { $replacements = []; if ($type == 'social_user' && !empty($data['message'])) { /** @var \Drupal\message\Entity\Message $message */ $message = $data['message']; if ($message instanceof Message) { if ($type == 'social_user') { foreach ($tokens as $name => $original) { switch ($name) { case 'recipient': if (isset($data['display_name'])) { $replacements[$original] = $data['display_name']; } Loading @@ -53,7 +46,6 @@ function social_user_tokens($type, $tokens, array $data, array $options, Bubblea } } } } return $replacements; } Loading
modules/social_features/social_user/social_user.tokens.inc +8 −16 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ */ use Drupal\Core\Render\BubbleableMetadata; use Drupal\message\Entity\Message; /** * Implements hook_token_info(). Loading Loading @@ -36,16 +35,10 @@ function social_user_token_info() { function social_user_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { $replacements = []; if ($type == 'social_user' && !empty($data['message'])) { /** @var \Drupal\message\Entity\Message $message */ $message = $data['message']; if ($message instanceof Message) { if ($type == 'social_user') { foreach ($tokens as $name => $original) { switch ($name) { case 'recipient': if (isset($data['display_name'])) { $replacements[$original] = $data['display_name']; } Loading @@ -53,7 +46,6 @@ function social_user_tokens($type, $tokens, array $data, array $options, Bubblea } } } } return $replacements; }