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