[wp-trac] [WordPress Trac] #42463: Poor Description of add_image_size Params
WordPress Trac
noreply at wordpress.org
Fri Apr 12 16:25:43 UTC 2019
#42463: Poor Description of add_image_size Params
--------------------------+----------------------------
Reporter: miqrogroove | Owner: nikolastoqnow
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.2
Component: Media | Version: 3.9
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: docs
--------------------------+----------------------------
Changes (by joemcgill):
* keywords: has-patch => needs-patch
Comment:
Thanks for the refresh @audrasjb. The latest change to the wording
improves the understanding of the boolean value, but omits the behavior of
the `$crop` parameter if it's set as an array. Ideally, the description
for this parameter would summarize the behavior outlined in the
description for this function:
If false (default), images will be scaled, not cropped.
If an array in the form of array( x_crop_position, y_crop_position ):
x_crop_position accepts ‘left’ ‘center’, or ‘right’.
y_crop_position accepts ‘top’, ‘center’, or ‘bottom’. Images will be
cropped to the specified dimensions within the defined crop area.
If true, images will be cropped to the specified dimensions using center
positions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42463#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list