WordPress как на ладони
Шаблоны, плагины и темы для настоящих поклонников Elementor. От TemplateMonster.com wordpress jino
событие не описано

add_attachment хук-событие . WP 2.0.0

Fires once an attachment has been added.

Использование

add_action( 'add_attachment', 'action_function_name_8665' );
function action_function_name_8665( $post_ID ){
	// action...
}
$post_ID(число)
Attachment ID.

Где используется хук

wp_insert_post() остальные хуки:

Код хука

Фрагмент из: wp-includes/post.php VER 4.9.8
...
			 *
			 * @param int     $post_ID      Post ID.
			 * @param WP_Post $post_after   Post object following the update.
			 * @param WP_Post $post_before  Post object before the update.
			 */
			do_action( 'attachment_updated', $post_ID, $post_after, $post_before );
		} else {

			/**
			 * Fires once an attachment has been added.
			 *
			 * @since 2.0.0
			 *
			 * @param int $post_ID Attachment ID.
			 */
			do_action( 'add_attachment', $post_ID );
		}

		return $post_ID;
	}

	if ( $update ) {
		/**
		 * Fires once an existing post has been updated.
		 *
		 * @since 1.2.0
		 *
		 * @param int     $post_ID Post ID.
		 * @param WP_Post $post    Post object.
		 */
		do_action( 'edit_post', $post_ID, $post );
...