Fires once an attachment has been added.
$post_idint
This hook is called when an attachment created by wp_insert_attachment() in wp-includes/post.php.
do_action( 'add_attachment', $post_id );
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/add_attachment