We introduced hook_element_info_alter() in #527804: element_info() cannot be altered, which now is kinda detached, because there is no hook_element_info(), but hook_elements() instead.
Simple change. Just grep + replace all instances of '_elements' with '_element_info' throughout core + change the hook invocation in element_info(), common.inc.
Comment | File | Size | Author |
---|---|---|---|
#8 | drupal-element-info.8.patch | 21.44 KB | sun |
#7 | drupal-element-info.6.patch | 15.24 KB | sun |
#1 | drupal-element-info.patch | 14.89 KB | sun |
Comments
Comment #1
sunPretty much RTBC.
Comment #2
sunoopsie
Comment #4
yched CreditAttribution: yched commentedMakes sense, and should be good to go if bot comes back green.
My only nitpick is that the variable name $type looks odd in:
Why not $elements ? or $types (plural) ? or simply $return ?
Comment #5
sunWe use $type everywhere related to element types currently. So all of the contained changes are for consistency only. Renaming $type to $types or $elements might make sense, but I'd prefer to defer to a separate issue ;)
Failed to install HEAD doesn't sound nice... HEAD broken? :/
Comment #6
yched CreditAttribution: yched commented"We use $type everywhere related to element types currently".
I'm fine with that, but the returned array should be named $types (plural), then ?
Comment #7
sunWhat a stupid mistake... ;)
Comment #8
sunok, but only because it's you :)
Renamed everything to $types.
Comment #9
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!
Comment #10
sunNeeds docs.
Comment #11
Island Usurper CreditAttribution: Island Usurper commentedAdded to update page.
Comment #12
sunAwesome!