Last active
August 29, 2015 14:06
-
-
Save angry-dan/bcf02d2d8f1572a6a10f to your computer and use it in GitHub Desktop.
Create custom tokens (Drupal token_custom module) with an update hook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $token = new stdClass(); | |
| $token->machine_name = 'machine-name-like-this'; | |
| $token->name = 'Name like this'; | |
| $token->description = 'Description like this'; | |
| $token->type = 'bundle_name'; | |
| $token->content = 'Default value'; | |
| $token->format = 'filtered_html'; | |
| $token->is_new = TRUE; | |
| token_custom_save($token); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment