Process creating a gallery:
- I create a post with post format gallery
- I add images from "Add media", note I don't use "Create gallery" but insert pictures into the post
then I have a php side
$attachments = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $atts['order'], 'orderby' => $atts['orderby'] ) );
this code comes from
gallery_shortcode function in media.php.
it works perfect, but when I try to delete image from post, no matter how I try it it is still there. I have not tried this but obviously deleting image permanently from media would work, but I want this images to still remain there.
how to delete them as attachments for this images from post editor?