Unattaching images from a post
This can be done using an Ajax call that will query the database and set the parent as “zero”. First, create a meta box, enqueue the Javascript that calls the unattach function and register this WP_Ajax function. <?php /* Plugin Name: Unattach Meta Box Version: 0.3 Author: brasofilo Plugin URI: http://wordpress.stackexchange.com/q/54822 */ add_action( ‘add_meta_boxes’, ‘wpse_54822_add_custom_box’ … Read more