Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It's confusing that when menu items are defined, it's called $items, but when they're altered they're called $callbacks.
Needs to be changed in the docs, and anywhere in core that hook_menu_alter() is implemented (unit tests if anywhere, probably).
Comment | File | Size | Author |
---|---|---|---|
#7 | hook_menu_alter.patch | 1.7 KB | fusedpro |
#2 | hook_menu_alter.patch | 1.13 KB | fusedpro |
Comments
Comment #1
webchickComment #2
fusedpro CreditAttribution: fusedpro commentedChanged references in the only hook_menu_alter() reference in core.
Unit tests didn't appear to have any references.
Comment #3
sunComment #4
Dave ReidThere are a few more replacements in menu.inc that we should do as well for consistency:
Comment #5
webchickOh, shoot. :) In the meantime, I committed the patch from #2. Thanks, fusedpro!
Want to take it all the way? :)
Comment #6
webchickRemoving some tags. We had a nice discussion in #drupal on how to highlight these types of issues and "novice" was the winner.
Comment #7
fusedpro CreditAttribution: fusedpro commentedFixed the other references as pointed out by Dave Reid.
Comment #8
sun$items is very ambigious and unclear. We should do the opposite - hook_menu() implementations should use $callbacks, not $items.
Comment #9
webchickAfter talking over this more in IRC, I agree with sun that changing the internal menu system names for these actually makes *that* code less clear. Let's just take this as far as the module-developer-facing APIs, as scoped in the original patch. So I consider this issue closed since #2 was committed to HEAD. Thanks, fusedpro!
Anyone up for a back-port to 6.x?
Comment #10
webchickTo be clear, someone with a CVS account needs to commit this patch to the DRUPAL-6 branch of contributions/docs/developer/hooks/core.php.
Comment #11
Gábor HojtsyDoes not apply directly to docs/hooks/core.php in 6.x. Needs backport.
Comment #12
Dave ReidI went ahead and committed the change to docs/hooks/core.php since any CVS user has commit access to that project.
http://drupal.org/cvs?commit=172153
This is now fixed! Thanks everyone!