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

Props amereservant, wonderboymusic.
Fixes #23401.

Built from https://develop.svn.wordpress.org/trunk@34007


git-svn-id: http://core.svn.wordpress.org/trunk@33976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-10 18:04:24 +00:00
parent 6e22d94488
commit 8cd584e6ed
2 changed files with 5 additions and 3 deletions

View File

@ -110,10 +110,12 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
* Filter the image sizes automatically generated when uploading an image.
*
* @since 2.9.0
* @since 4.4.0 The `$metadata` argument was addeed
*
* @param array $sizes An associative array of image sizes.
* @param array $sizes An associative array of image sizes.
* @param array $metadata An associative array of image metadata: width, height, file.
*/
$sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes );
$sizes = apply_filters( 'intermediate_image_sizes_advanced', $sizes, $metadata );
if ( $sizes ) {
$editor = wp_get_image_editor( $file );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34006';
$wp_version = '4.4-alpha-34007';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.