bgallagh3r
5/23/2012 - 8:46 PM

Wordpress: Disable Hyperlinking Images

Wordpress: Disable Hyperlinking Images

<?php
/*
Source: http://andrewnorcross.com/tutorials/functions-file/stop-hyperlinking-images/
Description: This removes the auto linking feature for post images in wordpress.  By default they link to the "full size" image.  This disables linking altogether.  Equates to pushing the none button in the media/image tab.
*/
$image_set = get_option( 'image_default_link_type' );
    if (!$image_set == 'none') {
        update_option('image_default_link_type', 'none');
    }
?>