Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
New filter for adding image sizes to WP Media lightbox
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
You can’t perform that action at this time.