[wp-hackers] Prevent attaching unattached attachments (nice!) on sending to editor

Barry Ceelen barry at multipop.org
Fri Sep 4 15:31:00 UTC 2015

Hi All,

Unattached images inserted into a post via the media library tab automatically get attached to the post.
I’m looking to prevent this from happening.

The wp_ajax_send_attachment_to_editor() function (https://developer.wordpress.org/reference/functions/wp_ajax_send_attachment_to_editor/) has a filter at the end, but by that time the attachment is already attached.
Any tips on handling this?



More information about the wp-hackers mailing list