Created
May 23, 2012 20:46
-
-
Save bgallagh3r/2777694 to your computer and use it in GitHub Desktop.
Wordpress: Disable Hyperlinking Images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment