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 |
---|---|
620 | /** |
621 | * Filters the meta data for the new image created by editing an existing image. |
622 | * |
623 | * @since 5.5.0 |
624 | * |
625 | * @param array $new_image_meta Meta data for the new image. |
626 | * @param int $new_attachment_id Attachment post ID for the new image. |
627 | * @param int $attachment_id Attachment post ID for the edited (parent) image. |
628 | */ |
629 | $new_image_meta = apply_filters( 'wp_edited_image_metadata', $new_image_meta, $new_attachment_id, $attachment_id ); |
630 |
|
631 | wp_update_attachment_metadata( $new_attachment_id, $new_image_meta ); |
632 |
|
633 | $response = $this->prepare_item_for_response( get_post( $new_attachment_id ), $request ); |
634 | $response->set_status( 201 ); |
635 | $response->header( 'Location', rest_url( sprintf( '%s/%s/%s', $this->namespace, $this->rest_base, $new_attachment_id ) ) ); |
636 |
|
637 | return $response; |
638 | } |