Skip to content

Instantly share code, notes, and snippets.

@barbwiredmedia
Created August 11, 2014 16:57
Show Gist options
  • Save barbwiredmedia/c2882dd9222ef7c6eafc to your computer and use it in GitHub Desktop.
Save barbwiredmedia/c2882dd9222ef7c6eafc to your computer and use it in GitHub Desktop.
function wpmayor_filter_image_sizes( $sizes) {
unset( $sizes['thumbnail']);
unset( $sizes['medium']);
unset( $sizes['large']);
unset( $sizes['wysija-newsletters-max']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'wpmayor_filter_image_sizes');
function wpmayor_custom_image_sizes($sizes) {
$myimgsizes = array(
"image-in-post" => __( "Image in Post" ),
"full" => __( "Original size" )
);
return $myimgsizes;
}
add_filter('image_size_names_choose', 'wpmayor_custom_image_sizes');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment