Created
September 10, 2015 23:28
-
-
Save BrandonShutter/1974b3194c35f9d67afb to your computer and use it in GitHub Desktop.
Remove WordPress automatic cropping
This file contains hidden or 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
<?php | |
/** | |
* Remove standard image sizes so that these sizes are not created during the Media Upload process | |
* | |
* @param $sizes, array of default images | |
* @return $sizes, new array of images | |
*/ | |
function cn_image_sizes( $sizes) { | |
unset( $sizes['thumbnail']); | |
unset( $sizes['medium']); | |
unset( $sizes['large']); | |
return $sizes; | |
} | |
add_filter('intermediate_image_sizes_advanced', 'cn_image_sizes'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment