WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about rest_after_insert_attachment

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php do_action 200 /**
* Fires after a single attachment is completely created or updated via the REST API.
*
* @since 5.0.0
*
* @param WP_Post $attachment Inserted or updated attachment object.
* @param WP_REST_Request $request Request object.
* @param bool $creating True when creating an attachment, false when updating.
*/
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php do_action 357 /**
* Updates a single attachment.
*
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_REST_Response|WP_Error Response object on success, WP_Error object on failure.
*/

Hook Parameters

Parameter Type Name Description
WP_Post $attachment Inserted or updated attachment object.
WP_REST_Request $request Request object.
bool $creating True when creating an attachment, false when updating.
WP_Post $attachment Inserted or updated attachment object.
WP_REST_Request $request Request object.
bool $creating True when creating an attachment, false when updating.