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 |
---|---|
658 | /** |
659 | * Filters the meta data for the new image created by editing an existing image. |
660 | * |
661 | * @since 5.5.0 |
662 | * |
663 | * @param array $new_image_meta Meta data for the new image. |
664 | * @param int $new_attachment_id Attachment post ID for the new image. |
665 | * @param int $attachment_id Attachment post ID for the edited (parent) image. |
666 | */ |
667 | $new_image_meta = apply_filters( 'wp_edited_image_metadata', $new_image_meta, $new_attachment_id, $attachment_id ); |
668 |
|
669 | wp_update_attachment_metadata( $new_attachment_id, $new_image_meta ); |
670 |
|
671 | $response = $this->prepare_item_for_response( get_post( $new_attachment_id ), $request ); |
672 | $response->set_status( 201 ); |
673 | $response->header( 'Location', rest_url( sprintf( '%s/%s/%s', $this->namespace, $this->rest_base, $new_attachment_id ) ) ); |
674 |
|
675 | return $response; |
676 | } |