[wp-trac] [WordPress Trac] #48303: Docblock improvements for 5.4
WordPress Trac
noreply at wordpress.org
Fri Jan 24 15:54:14 UTC 2020
#48303: Docblock improvements for 5.4
----------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.4
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses: docs
----------------------------+---------------------
Comment (by marekdedic):
Hi, I started by looking at the function `get_the_post_thumbnail` and its
parameter `$size`, which is currently of the type `string|array`. I think
this could be narrowed down to `string|int[]` by examining its source and
all the functions and hooks it calls. As such, I think these functions and
hooks could have their parameter `$size` narrowed in the same way. The
ones I encountered:
Functions:
- `get_the_post_thumbnail`
- `wp_get_attachment_image`
- `wp_get_attachment_image_src`
- `image_downsize`
- `image_get_intermediate_size`
- `image_constrain_size_for_editor`
Hooks:
- `begin_fetch_post_thumbnail_html`
- `end_fetch_post_thumbnail_html`
- `wp_get_attachment_image_src`
- `image_downsize`
- `image_get_intermediate_size`
- `editor_max_image_size`
However, I'm pretty sure there are more.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48303#comment:71>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list