Skip to content

Instantly share code, notes, and snippets.

@ovizii
Created July 27, 2013 15:06
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 ovizii/6095108 to your computer and use it in GitHub Desktop.
Save ovizii/6095108 to your computer and use it in GitHub Desktop.
Add custom image sizes to drop-down selector
// 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