Created
July 27, 2013 15:06
-
-
Save ovizii/6095108 to your computer and use it in GitHub Desktop.
Add custom image sizes to drop-down selector
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
// Tell the media panel to add the new size to the dropbown | |
function custom_image_sizes($sizes) { | |
$addsizes = array( | |
'logo' => __('logo'), | |
'grid_12' => __('slides') | |
); | |
$newsizes = array_merge($sizes, $addsizes); | |
return $newsizes; | |
} | |
add_filter('image_size_names_choose', 'custom_image_sizes'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment