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.
Line | Code |
---|---|
578 | $t['value'] = join(', ', $values); |
579 |
|
580 | $form_fields[$taxonomy] = $t; |
581 | } |
582 |
|
583 | // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default |
584 | // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing ) |
585 | $form_fields = array_merge_recursive($form_fields, (array) $errors); |
586 |
|
587 | $form_fields = apply_filters('attachment_fields_to_edit', $form_fields, $post); |
588 |
|
589 | return $form_fields; |
590 | } |
591 |
|
592 | function get_media_items( $post_id, $errors ) { |
593 | if ( $post_id && $post = get_post($post_id) ) { |
594 | if ( $post->post_type == 'attachment' ) |
595 | $attachments = array($post->ID => $post); |
596 | else |