Rename hook_ to MODULE_ or EXTENSION_ to identify the part of the function name needing change

Created on 14 April 2014, over 10 years ago
Updated 2 July 2024, 6 months ago

Problem/Motivation

For new module developers hooks are a bit confusing to figure out how they work. One helpful bit is when the hooks show _FORM_ID_ or THEME_ the identify the parts of the hook that need to be changed for your module or theme.

Proposed resolution

Id propose making all the hook_ to HOOK_ to promote this visual modifiable part of the identifier throughout core.

Before:
hook_entity_type_alter
After:
HOOK_entity_type_alter

Remaining tasks

Discuss any drawbacks.
Create a meta and add to coder review.

User interface changes

n/a

API changes

n/a

📌 Task
Status

Closed: won't fix

Version

11.0 🔥

Component
Documentation 

Last updated 1 day ago

No maintainer
Created by

🇨🇦Canada joelpittet Vancouver

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024