WordPress at a glance
action is not described

wp_media_attach_action action-hook . WP 5.5.0

Fires when media is attached or detached from a post.

Usage

add_action( 'wp_media_attach_action', 'action_function_name_7113', 10, 3 );
function action_function_name_7113( $action, $attachment_id, $parent_id ){
	// action...
}
$action(string)
Attach/detach action. Accepts 'attach' or 'detach'.
$attachment_id(int)
The attachment ID.
$parent_id(int)
Attachment parent ID.

Список изменений

С версии 5.5.0 Введена.

Где вызывается хук

wp_media_attach_action()
wp_media_attach_action
wp-admin/includes/media.php 3742
do_action( 'wp_media_attach_action', $action, $attachment_id, $parent_id );

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

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