Fires when media is attached or detached from a post.
$actionstring
'attach' or 'detach'.$attachment_idint
$parent_idint
do_action( 'wp_media_attach_action', $action, $attachment_id, $parent_id );
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_media_attach_action