Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: attachment_fields_to_edit

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1112           $t['value'] = join(', ', $values);
1113
1114           $form_fields[$taxonomy] = $t;
1115      }
1116
1117      // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default
1118      // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing )
1119      $form_fields = array_merge_recursive($form_fields, (array) $errors);
1120
1121      $form_fields = apply_filters('attachment_fields_to_edit', $form_fields, $post);
1122
1123      return $form_fields;
1124 }
1125
1126 /**
1127  * Retrieve HTML for media items of post gallery.
1128  *
1129  * The HTML markup retrieved will be created for the progress of SWF Upload
1130  * component. Will also create link for showing and hiding the form to modify