Make WordPress Core

Changeset 34007


Ignore:
Timestamp:
09/10/2015 06:03:20 PM (9 years ago)
Author:
wonderboymusic
Message:

In wp_generate_attachment_metadata(), also pass $metadata to the intermediate_image_sizes_advanced filter.

Props amereservant, wonderboymusic.
Fixes #23401.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image.php

    r32642 r34007  
    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 ) {
Note: See TracChangeset for help on using the changeset viewer.