function heartbeat_like_tokens_alter in Heartbeat 8
Implements hook_tokens_alter().
Parameters
array $replacements:
array $context:
BubbleableMetadata $bubbleable_metadata:
File
- modules/
heartbeat_like/ heartbeat_like.tokens.inc, line 81 - Token for heartbeat_like.
Code
function heartbeat_like_tokens_alter(array &$replacements, array $context, \Drupal\Core\Render\BubbleableMetadata $bubbleable_metadata) {
foreach ($replacements as $key => $replacement) {
if ($key === '[flagcount:count]' && $replacement == 0) {
$replacements[$key] = "";
}
}
}