Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#30636 closed defect (bug) (fixed)

image_downsize doesn't document the return value

Reported by: rmccue's profile rmccue Owned by: rmccue's profile rmccue
Milestone: 4.4 Priority: normal
Severity: minor Version:
Component: Media Keywords: has-patch
Focuses: docs Cc:


Neither the filter nor function for image_downsize document fully the return value. This means that in order to write your own downsizer, you need to look at how it works internally, which is a pain.

Attachments (1)

30636.diff (745 bytes) - added by DrewAPicture 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @rmccue
9 years ago

  • Owner set to rmccue
  • Status changed from new to assigned

#2 @wonderboymusic
8 years ago

  • Milestone changed from Awaiting Review to Future Release

I look forward to this

8 years ago

#3 @DrewAPicture
8 years ago

  • Keywords has-patch added; needs-patch needs-docs removed
  • Milestone changed from Future Release to 4.4

#4 @DrewAPicture
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 34362:

Docs: Add a more complete return description for the array of data (or false) returned by image_downsize().

If not short-circuited via the image_downsize boolean filter, image_downsize() returns an array of data including the image URL, width, height, and whether the image size is intermediate, in that order. Otherwise, it returns false.

Fixes #30636.

Note: See TracTickets for help on using tickets.