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 |
---|---|
398 | $post['post_excerpt'] = $attachment['post_excerpt']; |
399 | if ( isset($attachment['menu_order']) ) |
400 | $post['menu_order'] = $attachment['menu_order']; |
401 |
|
402 | if ( isset($send_id) && $attachment_id == $send_id ) { |
403 | if ( isset($attachment['post_parent']) ) |
404 | $post['post_parent'] = $attachment['post_parent']; |
405 | } |
406 |
|
407 | $post = apply_filters('attachment_fields_to_save', $post, $attachment); |
408 |
|
409 | if ( isset($post['errors']) ) { |
410 | $errors[$attachment_id] = $post['errors']; |
411 | unset($post['errors']); |
412 | } |
413 |
|
414 | if ( $post != $_post ) |
415 | wp_update_post($post); |
416 |
|