Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34458 closed enhancement (fixed)

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

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

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 11 years ago.
34458.diff​ (2.0 KB ) - added by jaspermdegroot 11 years ago.

Download all attachments as: .zip

Change History (7)

#1 @jaspermdegroot
11 years ago

Oops. Please ignore the .patch file

#2 @azaozz
11 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 11 years ago by azaozz (previous) (diff)

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


11 years ago

#4 @jaspermdegroot
11 years ago

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

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

#5 @DrewAPicture
11 years ago

  • Milestone Awaiting Review → 4.4
  • Resolution → fixed
  • Status new → closed

See [35412].

Note: See TracTickets for help on using tickets.