Created
July 29, 2017 09:45
-
-
Save sabrina-zeidan/356e3ffba4dfee700d51639f67bd8b83 to your computer and use it in GitHub Desktop.
Prevent links around your images on image upload in the content [Wordpress]
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
function prevent_image_links() { | |
$image_set = get_option( 'image_default_link_type' ); | |
if ($image_set !== 'none') { | |
update_option('image_default_link_type', 'none'); | |
} | |
} | |
add_action('admin_init', 'prevent_image_links', 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment