Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#34458 closed enhancement (fixed)

wp_get_attachment_image_sizes filter: Make the $width variable always contain the width value

Reported by: jaspermdegroot's profile jaspermdegroot Owned by:
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: Media Keywords:
Focuses: Cc:

Description

Currently the $width variable of the wp_get_attachment_image_sizes filter only contains a value if an argument was passed to the $width parameter of wp_get_attachment_image_sizes(). The attached patch makes it always contain the width value that is used inside the function, i.e. also if it has been retrieved from the image size.

Attachments (2)

34458.patch (2.0 KB) - added by jaspermdegroot 10 years ago.
34458.diff (2.0 KB) - added by jaspermdegroot 10 years ago.

Download all attachments as: .zip

Change History (7)

#1 @jaspermdegroot
10 years ago

Oops. Please ignore the .patch file

#2 @azaozz
10 years ago

Related #34430. Also see https://core.trac.wordpress.org/attachment/ticket/34430/34430.2.diff which removes the $width argument from wp_get_attachment_image_sizes() and uses $size_array (array( width, height)) instead.

Last edited 10 years ago by azaozz (previous) (diff)

This ticket was mentioned in Slack in #feature-respimg by azaozz. View the logs.


10 years ago

#4 @jaspermdegroot
10 years ago

@azaozz This ticket can be closed since it's no longer applicable after [35412]

Last edited 10 years ago by jaspermdegroot (previous) (diff)

#5 @DrewAPicture
10 years ago

  • Milestone changed from Awaiting Review to 4.4
  • Resolution set to fixed
  • Status changed from new to closed

See [35412].

Note: See TracTickets for help on using tickets.