STOP Annoying Links on Image Inserts

I found this little snippet on Norcross blog.  It will save me a lot of agreviation in the future with the anchor tags to the attachment page or media file.


add_action('admin_init', 'ws_imagelink_setup', 10);
function ws_imagelink_setup() {
 $image_set = get_option( 'image_default_link_type' );

 if ($image_set !== 'none') {
 update_option('image_default_link_type', 'none');
 }
}

Scroll to Top