wp_media_attach_action

wp_media_attach_action

Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('wp_media_attach_action') is found 1 times:

  • /wp-admin/includes/media.php line 3866
    3862
    3863
    3864
    3865
    3866
    3867
    3868
    3869
    3870
    3871
    3872
         * @param string $action        Attach/detach action. Accepts 'attach' or 'detach'.
         * @param int    $attachment_id The attachment ID.
         * @param int    $parent_id     Attachment parent ID.
         */
        do_action( 'wp_media_attach_action', $action, $attachment_id, $parent_id );
     
        clean_attachment_cache( $attachment_id );
    }
     
    $location = 'upload.php';
    $referer  = wp_get_referer();