rest_after_insert_attachment, $attachment, $request, true
rest_after_insert_attachment, $attachment, $request, true
Appears in: gutenberg.23.6.2
Hook Type: action
Displaying hooks found in version: gutenberg.23.6.2do_action('rest_after_insert_attachment, $attachment, $request, true') is found 1 times:
- /lib/media/class-gutenberg-rest-attachments-controller.php line 730
* wp_after_insert_post), but not the REST-specific action, so fire it * here for parity with the uploaded-file path in create_item(). */ /** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php */ do_action( 'rest_after_insert_attachment', $attachment, $request, true ); $response = $this->prepare_item_for_response( $attachment, $request ); $response->set_status( 201 ); $response->header( 'Location', rest_url( rest_get_route_for_post( $attachment_id ) ) ); return $response;