WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about rest_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 307 /**
* Fires after a single attachment is created or updated via the REST API.
*
* @since 4.7.0
*
* @param WP_Post $attachment Inserted or updated attachment
* object.
* @param WP_REST_Request $request The request sent to the API.
* @param bool $creating True when creating an attachment, false when updating.
*/

Hook Parameters

Parameter Type Name Description
WP_Post $attachment Inserted or updated attachment
WP_REST_Request $request The request sent to the API.
bool $creating True when creating an attachment, false when updating.