Skip to content

Instantly share code, notes, and snippets.

@jayarjo
Created April 10, 2015 14:57
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 jayarjo/46bd7d2e3007a2350639 to your computer and use it in GitHub Desktop.
Save jayarjo/46bd7d2e3007a2350639 to your computer and use it in GitHub Desktop.
wp: additional sizes for insert into post
function f__image_size_names_choose( $sizes ) {
global $_wp_additional_image_sizes;
if ( empty($_wp_additional_image_sizes) )
return $sizes;
foreach ( $_wp_additional_image_sizes as $id => $data ) {
if ( !isset($sizes[$id]) )
$sizes[$id] = ucfirst( str_replace( '-', ' ', $id ) );
}
return $sizes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment