Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created August 20, 2012 14:52
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save billerickson/3404890 to your computer and use it in GitHub Desktop.
Save billerickson/3404890 to your computer and use it in GitHub Desktop.
Add Custom Image Sizes to Media Uploader
<?php
/**
* Add Custom Image Sizes to Media Uploader
* @author Pippin Williamson
* @link http://pippinsplugins.com/add-custom-image-sizes-to-media-uploader/
*
* @param array $sizes
* @return array
*/
function pw_show_image_sizes( $sizes ) {
$sizes['pw-thumb'] = __( 'Custom Thumb', 'pippin' );
$sizes['pw-large'] = __( 'Custom Large', 'pippin' );
return $sizes;
}
add_filter( 'image_size_names_choose', 'pw_show_image_sizes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment