Skip to content

Instantly share code, notes, and snippets.

@bgallagh3r
Created May 23, 2012 20:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bgallagh3r/2777694 to your computer and use it in GitHub Desktop.
Save bgallagh3r/2777694 to your computer and use it in GitHub Desktop.
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');
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment