Skip to content

Instantly share code, notes, and snippets.

@leepettijohn
Created April 11, 2015 04:47
Show Gist options
  • Select an option

  • Save leepettijohn/5ebec5503a02a8f432d0 to your computer and use it in GitHub Desktop.

Select an option

Save leepettijohn/5ebec5503a02a8f432d0 to your computer and use it in GitHub Desktop.
Add image size to Media Insert
add_filter('image_size_names_choose', 'my_image_sizes');
function my_image_sizes($sizes) {
$addsizes = array(
"new-size" => __( "New Size")
);
$newsizes = array_merge($sizes, $addsizes);
return $newsizes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment