diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-04 18:28:29 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-04 18:28:29 +0000 |
commit | acc3e9312c287e12eb9c38ff991db0402e3a8b80 (patch) | |
tree | 7953d2526994a7fcbfde895fb29a2970ced13eb9 | |
parent | 039e7dbec87f3f08b8be22c8e9a6d5a009bc4f26 (diff) | |
download | brdo-acc3e9312c287e12eb9c38ff991db0402e3a8b80.tar.gz brdo-acc3e9312c287e12eb9c38ff991db0402e3a8b80.tar.bz2 |
#719432 by heyrocker: Document hook_field_extra_fields_alter().
-rw-r--r-- | modules/field/field.api.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php index 7af943d9a..51489c28d 100644 --- a/modules/field/field.api.php +++ b/modules/field/field.api.php @@ -28,6 +28,8 @@ * - weight: The default weight of the element. * - view: (optional) The name of the element as it appears in the rendered * structure, if different from the name in the form. + * + * @see hook_field_extra_fields_alter() */ function hook_field_extra_fields() { $extra = array(); @@ -62,6 +64,23 @@ function hook_field_extra_fields() { } /** + * Alter "pseudo-field" components on fieldable entities. + * + * @param $info + * The associative array of 'pseudo-field' components. + * + * @see hook_field_extra_fields() + */ +function hook_field_extra_fields_alter(&$info) { + // Force node title to always be at the top of the list + // by default. + if (isset($info['title'])) { + $info['title']['weight'] = -20; + } + +} + +/** * @} End of "ingroup field_fieldable_type" */ |