diff --git a/pift.module b/pift.module
index d173a6e..81aacd5 100644
--- a/pift.module
+++ b/pift.module
@@ -651,3 +651,99 @@ function pift_compatibility_list() {
 
   return $compatibility_list;
 }
+
+/**
+ * Implements hook_extended_file_field_metadata_types().
+ *
+ * Defines additional PIFT metadata properties for the extended file field
+ * formatter and widget, including the associated 'Test ID', 'Test Status',
+ * 'Test Message' and 'Test Operations' information for a given file.
+ */
+function pift_extended_file_field_metadata_types() {
+  return array(
+    'pift_id' => array(
+      'title' => t('Test ID'),
+      'sort' => 'numeric',
+    ),
+    'pift_status' => array(
+      'title' => t('Test Status'),
+      'sort' => 'string',
+    ),
+    'pift_message' => array(
+      'title' => t('Test Status'),
+      'sort' => 'string',
+    ),
+    'pift_operations' => array(
+      'title' => t('Operations'),
+      'sort' => 'string',
+    ),
+  );
+}
+
+/**
+ * Implementation of hook_extended_file_field_items_alter().
+ *
+ * Adds PIFT related metadata (including test id, test result, and test
+ * operations) to the file $items array within fields using the
+ * extended_file_field field formatter.
+ *
+ * @param array $items
+ *   The array of file items from the field, keyed by file ID (fid).
+ * @param array $context
+ *   Associative array of context for the table of files being altered, with
+ *   the following keys:
+ *   - field: The field definition array.
+ *   - instance: The field instance definition array.
+ *   - entity: An object representing the entity the file field is attached to.
+ *   - entity_type: String with the type of entity the field is attached to.
+ *   - langcode: The language associated with $items.
+ *   - display: The display settings to use, as found in the 'display' entry of
+ *     the instance definition. Notable keys include the name of the formatter
+ *     (in 'type') and the array of formatter settings (in 'settings').
+ *
+ *  @see drupal_alter()
+
+ */
+function pift_extended_file_field_items_alter(&$items, &$context) {
+  // Add a 'Test ID' property to each item in the $items array.
+  $fids = array_keys($items);
+  $test_ids = pift_test_get_test_ids($fids);
+  $tests = pift_test_get_summary_multiple($test_ids);
+
+  foreach ($items as $key => $value) {
+    // Add the test id associated with each file to the $items array.
+    // If no test_id is found for a given file, set it to '0'.
+    $test_id = isset($test_ids[$value['fid']]) ? $test_ids[$value['fid']] : 0;
+    $items[$key]['pift_id'] = $test_id;
+    $items[$key]['pift_status'] = !empty($test_id) ? $tests[$test_id]['status'] : 0;
+    $items[$key]['pift_message'] = !empty($test_id) ? $tests[$test_id]['message'] : 0;
+    $items[$key]['pift_operations'] = !empty($test_id) ? array('view', 'retest') : array();
+  }
+}
+
+/**
+ * Implementation of hook_extended_file_field_widget_items_alter().
+ *
+ * Adds PIFT related metadata (including test id, test result, and test
+ * operations) to the file $items array within fields using the
+ * extended_file_field field widget.
+ *
+ * @param array $items
+ *   The array of file items from the field, keyed by file ID (fid).
+ * @param array $context
+ *   Associative array of context for the table of files being altered, with
+ *   the following keys:
+ *   - field: The field definition array.
+ *   - instance: The field instance definition array.
+ *   - entity: An object representing the entity the file field is attached to.
+ *   - entity_type: String with the type of entity the field is attached to.
+ *   - langcode: The language associated with $items.
+ *   - display: The display settings to use, as found in the 'display' entry of
+ *     the instance definition. Notable keys include the name of the formatter
+ *     (in 'type') and the array of formatter settings (in 'settings').
+ *
+ *  @see drupal_alter()
+ */
+function pift_extended_file_field_widget_items_alter(&$item, &$context) {
+  pift_extended_file_field_items_alter($items, $context);
+}
