add_attachment action-hookWP 2.0.0

Fires once an attachment has been added.

Usage

add_action( 'add_attachment', 'wp_kama_add_attachment_action' );

/**
 * Function for `add_attachment` action-hook.
 * 
 * @param int $post_ID Attachment ID.
 *
 * @return void
 */
function wp_kama_add_attachment_action( $post_ID ){

	// action...
}
$post_ID(int)
Attachment ID.

Changelog

Since 2.0.0 Introduced.

Where the hook is called

wp_insert_post()
add_attachment
wp-includes/post.php 4596
do_action( 'add_attachment', $post_ID );

Where the hook is used in WordPress

Usage not found.