WordPress.org

Make WordPress Core

Ticket #23401: 23401.diff

File 23401.diff, 847 bytes (added by wonderboymusic, 6 years ago)
  • src/wp-admin/includes/image.php

     
    110110                 * Filter the image sizes automatically generated when uploading an image.
    111111                 *
    112112                 * @since 2.9.0
     113                 * @since 4.4.0 The `$metadata` argument was addeed
    113114                 *
    114                  * @param array $sizes An associative array of image sizes.
     115                 * @param array $sizes    An associative array of image sizes.
     116                 * @param array $metadata An associative array of image metadata: width, height, file.
    115117                 */
    116                 $sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes );
     118                $sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes, $metadata );
    117119
    118120                if ( $sizes ) {
    119121                        $editor = wp_get_image_editor( $file );