Posted by sun on September 9, 2009 at 6:32pm
5 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | base system |
| Category: | task |
| Priority: | normal |
| Assigned: | sun |
| Status: | closed (fixed) |
| Issue tags: | DrupalWTF, Needs Documentation, Novice |
Issue Summary
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.
Comments
#1
Pretty much RTBC.
#2
oopsie
#3
The last submitted patch failed testing.
#4
Makes sense, and should be good to go if bot comes back green.
My only nitpick is that the variable name $type looks odd in:
function text_element_info() {$type['text_textfield'] = array(
'#input' => TRUE,
// ..
);
$type['text_textarea'] = array(
'#input' => TRUE,
// ..
);
$type['text_textarea_with_summary'] = array(
'#input' => TRUE,
// ..
);
return $type;
}
Why not $elements ? or $types (plural) ? or simply $return ?
#5
We 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? :/
#6
"We use $type everywhere related to element types currently".
I'm fine with that, but the returned array should be named $types (plural), then ?
#7
What a stupid mistake... ;)
#8
ok, but only because it's you :)
Renamed everything to $types.
#9
Committed to CVS HEAD. Thanks!
#10
Needs docs.
#11
Added to update page.
#12
Awesome!
#13
Automatically closed -- issue fixed for 2 weeks with no activity.