Standard Naming of Hooks in Themes
|Reported by:||dcole07||Owned by:||dcole07|
Hooks in themes are a great idea. Plugins can add their code in without making users do any copying and pasting. People it also safe guards changes to the theme, because your not editing core theme files. I can go into this more if need be.
What I want to do is create (an optional) standard for having hooks in themes. To popularize this, the default themes that come with WordPress should include these hooks. As more themes start using hooks in their themes and use the same hook names as everyone else, plugins and what not can start doing to WordPress themes as they did with WordPress.
I've asked some theme enthusiasts, as well as some popular theme developers, and they generally agree that these hooks should start out with theme_, use before / after instead of above / below or pre / post, use underscores in place of spaces, and be descriptive.
I'm going to take ownership of this ticket and create the patch. Feel free to voice your thoughts.
Change History (16)
- Keywords needs-patch removed
- Status changed from new to accepted
- Type changed from defect (bug) to enhancement
comment:14 @dcole07 — 6 years ago
- Keywords close removed
- Resolution set to wontfix
- Status changed from accepted to closed