Skip to content

Instantly share code, notes, and snippets.

@remkus
Created September 24, 2013 16:08
Show Gist options
  • Save remkus/6687132 to your computer and use it in GitHub Desktop.
Save remkus/6687132 to your computer and use it in GitHub Desktop.
attachement default no link
<?php
add_action( 'admin_init', 'fs_imagelink_setup', 10 );
/**
* Set default link option for attachments
*
* @return void
*/
function fs_imagelink_setup() {
$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