diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-04-30 19:21:52 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-04-30 19:21:52 +0000 |
commit | c3b99228848c136803783a6776a33c11d859ab42 (patch) | |
tree | e43b654a9296eb87b110d8a0f8e7beba053cb557 /modules/system/system.api.php | |
parent | 165b3253438ac4f041c36488de9dec944a3af450 (diff) | |
download | brdo-c3b99228848c136803783a6776a33c11d859ab42.tar.gz brdo-c3b99228848c136803783a6776a33c11d859ab42.tar.bz2 |
#718894 by robeano: Fixed hook_date_format_types_alter() is not documented.
Diffstat (limited to 'modules/system/system.api.php')
-rw-r--r-- | modules/system/system.api.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index dd1c801cc..cb2f2d534 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -3359,6 +3359,30 @@ function hook_date_format_types() { } /** + * Modify existing date format types. + * + * Allows other modules to modify existing date types like 'long'. Called + * by _system_date_format_types_build(). For instance, A module may use this + * hook to apply settings across all date format types, such as locking all + * date format types so they appear to be provided by the system. + * + * @param $types + * An associative array of date format types containing: + * - types: An array of date format types including configuration settings + * for each type: + * - is_new: Set to FALSE to override previous settings. + * - module: The name of the module that created the date format type. + * - type: The date type name. + * - title: The title of the date type. + * - locked: Specifies that the date type is system-provided. + */ +function hook_date_format_types_alter(&$types) { + foreach ($types as $type_name => $type) { + $types[$type_name]['locked'] = 1; + } +} + +/** * Defines additional date formats. * * Next to the 'long', 'medium' and 'short' date types defined in core, any |