Description
Fires after a single attachment is created or updated via the REST API.
Occurrences
Filename | Line Number |
---|---|
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php | 347 |
Parameters
Type | Name | Description |
---|---|---|
WP_Post | $attachment | Inserted or updated attachment object. |
WP_REST_Request | $request | The request sent to the API. |
bool | $creating | True when creating an attachment, false when updating. |
PHP Doc
/**
* 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.
*/