From 0d89030c27e405adcabe1d77db07cecdd5f79ee9 Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Thu, 6 Oct 2011 09:39:48 -0400
Subject: [PATCH] Issue #1300494 by pillarsdotnet: Update the documentation
 for hook_field_is_empty() to note that it is required, and
 to define the data types of its parameters and return
 value.

---
 modules/field/field.api.php |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index 88f9231ac8ce711cee6e21b17a52c2859e40a0ed..b52c3edd510e8b2f390f369f175810428b8f3254 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -650,16 +650,19 @@ function hook_field_prepare_translation($entity_type, $entity, $field, $instance
 }
 
 /**
- * Define what constitutes an empty item for a field type.
+ * Determine whether the given field data is considered to be empty.
+ *
+ * This hook is required for all field type implementations.
  *
  * @param $item
- *   An item that may or may not be empty.
+ *   An array of field data that may or may not be considered empty.
  * @param $field
- *   The field to which $item belongs.
+ *   The field array, as returned from field_info_field().
  *
  * @return
- *   TRUE if $field's type considers $item not to contain any data;
- *   FALSE otherwise.
+ *   TRUE if $item is considered to be empty; FALSE otherwise.
+ *
+ * @see _field_filter_items().
  */
 function hook_field_is_empty($item, $field) {
   if (empty($item['value']) && (string) $item['value'] !== '0') {
-- 
1.7.5.4

