Opened 10 years ago
Closed 10 years ago
#39148 closed enhancement (fixed)
Correct concatenated dynamic hooks
| Reported by: | keesiemeijer | Owned by: | johnbillion |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7.1 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
Cleaning up concatenated dynamic hooks as per the coding-standards
Related: #38462
Attachments (1)
Change History (10)
#2
@
10 years ago
- Component General → Formatting
- Keywords 2nd-opinion dev-feedback added
- Version → trunk
Hi @keesiemeijer,
It's a good idea, but that means cleaning a lot of current hooks :confused:
Moreover, I've heard that when formatting and/or coding standards are in, rather than applying to all curent application it's preferable to only apply on new tickets.
#3
@
10 years ago
I understand, but the documentation in the code reference relies on the hook names to be correct. For a fun example look here: https://developer.wordpress.org/reference/hooks/handle_bulk_actions-get_current_screen-id/
Should I create separate tickets for all of them?
#6
@
10 years ago
- Keywords 2nd-opinion dev-feedback removed
- Milestone Awaiting Review → 4.8
- Version trunk
Thanks for the patch, @keesiemeijer.
These dynamic hook names are indeed incorrect. Here's an example of where the hook name gets messed up on the code reference:
https://developer.wordpress.org/reference/hooks/handle_bulk_actions-get_current_screen-id/
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Use interpolation for naming of dynamic hooks