#45203 closed defect (bug) (fixed)
Document all optional parameters as optional in add_image_size()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | good-first-bug has-patch commit |
Focuses: | docs | Cc: |
Description (last modified by )
The parameter descriptions for the optional $width
and $height
parameters for add_image_size()
are not currently notated as such. Let's fix that.
For guidance on how to document optional parameters, note how the description for the optional fourth parameter, $crop
, is formatted.
<?php * * @param string $name Image size identifier. * @param int $width Image width in pixels. * @param int $height Image height in pixels. * @param bool|array $crop Optional. Whether to crop images to specified width and height or resize. * An array can specify positioning of the crop area. Default false. */ function add_image_size( $name, $width = 0, $height = 0, $crop = false ) { ...
Attachments (2)
Change History (13)
#3
@
5 years ago
This my first WordPress core commit, hope this is right! Still getting the hang of it! #Contribute!
This patch adjusts the doc block.
#5
@
5 years ago
- Keywords commit added
- Milestone changed from Future Release to 5.1
- Owner set to andrewza
- Status changed from new to assigned
Assigning the ticket to mark this good-first-bug as claimed.
Thanks for your contribution, @andrewza!
As per https://make.wordpress.org/core/2018/10/05/wordpress-5-0-commit-management/ we currently focus on Gutenberg for 5.0, but by the looks of it we can commit this enhancement soon afterwards in the next release.
#9
@
4 years ago
Thanks @DrewAPicture, planning on doing more commits for 2019. Hopefully more advanced ones. Have a great day further!
Patch #45203