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