Last active
August 29, 2015 14:06
-
-
Save stebrech/4bea40fe3b105773fea2 to your computer and use it in GitHub Desktop.
Crop uploaded images instead of scaling them – http://www.catswhocode.com/blog/best-wordpress-snippets-hacks-and-tips-from-2013
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
<?php | |
// Standard Size Thumbnail | |
if(false === get_option("thumbnail_crop")) { | |
add_option("thumbnail_crop", "1"); } | |
else { | |
update_option("thumbnail_crop", "1"); | |
} | |
// Medium Size Thumbnail | |
if(false === get_option("medium_crop")) { | |
add_option("medium_crop", "1"); } | |
else { | |
update_option("medium_crop", "1"); | |
} | |
// Large Size Thumbnail | |
if(false === get_option("large_crop")) { | |
add_option("large_crop", "1"); } | |
else { | |
update_option("large_crop", "1"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment