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 |
|---|---|
| 725 | /** |
| 726 | * Filters the meta data for the new image created by editing an existing image. |
| 727 | * |
| 728 | * @since 5.5.0 |
| 729 | * |
| 730 | * @param array $new_image_meta Meta data for the new image. |
| 731 | * @param int $new_attachment_id Attachment post ID for the new image. |
| 732 | * @param int $attachment_id Attachment post ID for the edited (parent) image. |
| 733 | */ |
| 734 | $new_image_meta = apply_filters( 'wp_edited_image_metadata', $new_image_meta, $new_attachment_id, $attachment_id ); |
| 735 | |
| 736 | wp_update_attachment_metadata( $new_attachment_id, $new_image_meta ); |
| 737 | |
| 738 | $response = $this->prepare_item_for_response( get_post( $new_attachment_id ), $request ); |
| 739 | $response->set_status( 201 ); |
| 740 | $response->header( 'Location', rest_url( sprintf( '%s/%s/%s', $this->namespace, $this->rest_base, $new_attachment_id ) ) ); |
| 741 | |
| 742 | return $response; |
| 743 | } |