WordPress.org

Make WordPress Core

Ticket #18520: patch.diff

File patch.diff, 677 bytes (added by alexkingorg, 3 years ago)

Allow image sizes to be filtered into media lightbox.

  • wp-admin/includes/media.php

     
    868868 
    869869                // get a list of the actual pixel dimensions of each possible intermediate version of this image 
    870870                $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full Size')); 
     871                // allow plugins/themes to add their custom defined image sizes 
     872                $size_names = apply_filters('image_size_input_fields_sizes', $size_names); 
    871873 
    872874                if ( empty($check) ) 
    873875                        $check = get_user_setting('imgsize', 'medium');