Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#25530 closed defect (bug) (fixed)

WP_Image_Editor: inline documentation fixed for multi_resize array keys

Reported by: paolal's profile paolal Owned by: drewapicture's profile DrewAPicture
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Inline Docs Keywords: has-patch commit
Focuses: Cc:


Added mention that:

	 * The key of each array will be returned as the image size (generally 'small', 'medium', or 'large').

and updated example:

	 * @param array $sizes { ['size'] => {'width'=>int, 'height'=>int, ['crop'=>bool]}, ... }

to remind that even if the key is not required, it has to be returned by the function due to core's utilisation of multi_resize

Seen with @DH-Shredder

Attachments (2)

25530.diff (2.7 KB) - added by paolal 10 years ago.
25530.2.diff (3.2 KB) - added by DrewAPicture 10 years ago.
hash notations

Download all attachments as: .zip

Change History (7)

10 years ago

#1 @markoheijnen
10 years ago

  • Keywords has-patch commit added
  • Milestone changed from Awaiting Review to 3.7

looks great and ready to commit.

#2 @DrewAPicture
10 years ago

  • Keywords commit removed

Array parameters should be documented using the hash notation style outlined in the inline docs standards.

#3 @DrewAPicture
10 years ago

  • Keywords needs-patch added; has-patch removed

10 years ago

hash notations

#4 @DrewAPicture
10 years ago

  • Keywords has-patch commit added; needs-patch removed

25530.2.diff handles the array hash notations.

#5 @DrewAPicture
10 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 25728:

Improve inline documentation for the multi_resize() method in WP_Image_Editor, WP_Image_Editor_GD, and WP_Image_Editor_Imagick.

Props paolal for the initial patch.
Fixes #25530.

Note: See TracTickets for help on using tickets.