WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 1054 | 'html' => image_align_input_fields($post, get_option('image_default_align')), |
| 1055 | ); |
| 1056 | |
| 1057 | $form_fields['image-size'] = image_size_input_fields( $post, get_option('image_default_size', 'medium') ); |
| 1058 | |
| 1059 | } else { |
| 1060 | unset( $form_fields['image_alt'] ); |
| 1061 | } |
| 1062 | |
| 1063 | $form_fields = apply_filters('attachment_fields_to_edit', $form_fields, $post); |
| 1064 | |
| 1065 | return $form_fields; |
| 1066 | } |
| 1067 | |
| 1068 | /** |
| 1069 | * Retrieve HTML for media items of post gallery. |
| 1070 | * |
| 1071 | * The HTML markup retrieved will be created for the progress of SWF Upload |
| 1072 | * component. Will also create link for showing and hiding the form to modify |
| Line | Code |
| 1369 | |
| 1370 | $form_fields[$taxonomy] = $t; |
| 1371 | } |
| 1372 | } |
| 1373 | |
| 1374 | // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default |
| 1375 | // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing ) |
| 1376 | $form_fields = array_merge_recursive($form_fields, (array) $args['errors'] ); |
| 1377 | |
| 1378 | $form_fields = apply_filters( 'attachment_fields_to_edit', $form_fields, $post ); |
| 1379 | |
| 1380 | unset( $form_fields['image-size'], $form_fields['align'], $form_fields['image_alt'], |
| 1381 | $form_fields['post_title'], $form_fields['post_excerpt'], $form_fields['post_content'], |
| 1382 | $form_fields['url'], $form_fields['menu_order'], $form_fields['image_url'] ); |
| 1383 | |
| 1384 | $media_meta = apply_filters( 'media_meta', '', $post ); |
| 1385 | |
| 1386 | $defaults = array( |
| 1387 | 'input' => 'text', |