Skip to content

Instantly share code, notes, and snippets.

@mustardBees
Created May 10, 2013 08:56
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 mustardBees/5553294 to your computer and use it in GitHub Desktop.
Save mustardBees/5553294 to your computer and use it in GitHub Desktop.
Add additional image sizes to the WordPress media upload/insert interface
<?php
/**
* Add additional image sizes to the WordPress media upload/insert interface
*
* @author Daniel Roizer
* @link http://goo.gl/0tKD0
*/
function iweb_additional_image_sizes( $sizes ) {
$additional_image_sizes = array(
'banner' => 'Banner'
);
return array_merge( $sizes, $additional_image_sizes );
}
add_filter( 'image_size_names_choose', 'iweb_additional_image_sizes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment