Skip to content

Instantly share code, notes, and snippets.

@pigmentGit
Created February 4, 2015 14:39
Show Gist options
  • Save pigmentGit/24cbe067e66d9014f158 to your computer and use it in GitHub Desktop.
Save pigmentGit/24cbe067e66d9014f158 to your computer and use it in GitHub Desktop.
Remove link to images when inserting in wisywig editor
function wpb_imagelink_setup() {
$image_set = get_option( 'image_default_link_type' );
if ($image_set !== 'none') {
update_option('image_default_link_type', 'none');
}
}
add_action('admin_init', 'wpb_imagelink_setup', 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment