see function _system_date_format_types_build() in modules/system/system.module
http://api.drupal.org/api/function/_system_date_format_types_build/7

It invokes drupal_alter(), leading to hook_date_format_types(), which isn't documented. See http://api.drupal.org/api/function/hook_date_format_types/7

This is part of this meta-issue: #675046: Make sure all hooks in D7 have documentation

CommentFileSizeAuthor
#8 718894.patch1.47 KBrobeano
#6 718894.patch1.47 KBrobeano
#5 718894.patch1.47 KBrobeano
#4 718894.patch1.39 KBrobeano

Comments

derjochenmeyer’s picture

Status: Active » Needs review

The title mentions hook_date_format_types_alter()

hook_date_format_types_alter() is not documented

While the text mentions hook_date_format_types()

hook_date_format_types(), which isn't documented

There is documentation for hook_date_format_types() at http://api.drupal.org/api/function/hook_date_format_types/7

If I am not misunderstanding somehting, this should be fixed?

jhodgdon’s picture

What happens is that in _system_date_format_types_build(), at the end, it does:

drupal_alter('date_format_types', $types);

Which means that it is invoking hook_date_format_types_alter().

Which isn't documented.

There is a typo in the original issue description. The issue title is correct.

jhodgdon’s picture

Status: Needs review » Active

status update (there is no patch to review)

robeano’s picture

Status: Active » Needs review
StatusFileSize
new1.39 KB

Patch attached. I am slightly concerned about my example. If someone has a better idea, please let me know.

robeano’s picture

StatusFileSize
new1.47 KB

What a mess! Thanks to jhodgdon for providing much needed advice! Let's try this again.

robeano’s picture

StatusFileSize
new1.47 KB

And again...minor fixes to meet standards.

jhodgdon’s picture

Status: Needs review » Needs work

Aside from a space at the end of one line, this looks great!

robeano’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.47 KB

Removed that last stinkin' space! We're all set here.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Great job! Committed to HEAD! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.