Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 15, 2015 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/5205491 to your computer and use it in GitHub Desktop.
Save braddalton/5205491 to your computer and use it in GitHub Desktop.
update_option('image_default_link_type', 'none')
function default_image_link_type() {
$image_set = get_option( 'image_default_link_type' );
if ($image_set !== 'post') {
update_option('image_default_link_type', 'post');
}
}
/**
* @author Brad Dalton - WP Sites
* @learn more http://wp.me/p1lTu0-9QI
*/
add_action('admin_init', 'default_image_link_type', 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment