Skip to content

Instantly share code, notes, and snippets.

@alexkingorg
Created October 1, 2011 06:32
Show Gist options
  • Save alexkingorg/1255689 to your computer and use it in GitHub Desktop.
Save alexkingorg/1255689 to your computer and use it in GitHub Desktop.
New filter for adding image sizes to WP Media lightbox
<?php
function cfcp_image_size_input_fields_sizes($sizes) {
$sizes['medium-img'] = 'Content Width';
$sizes['banner-img'] = 'Content Width Short (Cropped)';
$sizes['large-img'] = 'Full Width';
return $sizes;
}
add_filter('image_size_names_choose', 'cfcp_image_size_input_fields_sizes');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment