Guest User

Untitled

a guest
Aug 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. /**
  2. * Implements hook_tokens().
  3. */
  4. function mymodule_tokens($type, $tokens, array $data = array(), array $options = array()) {
  5. $replacements = array();
  6. if ($type == 'key_token' && !empty($data['node'])) {
  7. $node = $data['node'];
  8. foreach ($tokens as $name => $original) {
  9. $replacements[$original]='Some_value';
  10. }
  11. }
  12. }
  13. return $replacements;
  14. }
Add Comment
Please, Sign In to add comment