#45203 closed defect (bug) (fixed)
Document all optional parameters as optional in add_image_size()
| Reported by: | DrewAPicture | Owned by: | andrewza |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.1 |
| Component: | Media | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch commit |
| Cc: | Focuses: | docs |
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
@
8 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
@
8 years ago
- Keywords commit added
- Milestone Future Release → 5.1
- Owner set to
- Status new → 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
@
8 years ago
Thanks @DrewAPicture, planning on doing more commits for 2019. Hopefully more advanced ones. Have a great day further!
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch #45203