Use hyphens instead of underscores in token names

Created on 28 May 2025, 6 days ago

Problem/Motivation

The related issues have set up the [verify_email:url token. However, to follow the Drupal token naming convention it should be [verify-email:url]

Steps to reproduce

See parent issue.

Proposed resolution

Change the hooks to specify the token name with a hyphen instead of an underscore.

Remaining tasks

  1. In the tokenInfo hook, the $tokens array, the key of the first element is "verify-email", but it should actually be "url".
  2. In the return statement of the tokenInfo hook, replace both instances of "token_info" with "token-info".
  3. In the tokens hook, replace all three mentions of "token_info" with "token-info".

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇮🇪Ireland lostcarpark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024