[wp-trac] [WordPress Trac] #48303: Docblock improvements for 5.4
WordPress Trac
noreply at wordpress.org
Tue Mar 24 20:39:56 UTC 2020
#48303: Docblock improvements for 5.4
----------------------------+-----------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.4
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses: docs
----------------------------+-----------------------
Comment (by SergeyBiryukov):
Replying to [comment:101 westonruter]:
> This [https://github.com/WordPress/wordpress-
develop/commit/ec83cd08eb6f9f8ce1246f5d1dd4940d03f923b9#diff-
a37b83a4acb4f422e0c3320ab32d69a1L233-R241 change] to
`WP_Dependencies::add_data()` in r47170 appears to not be correct:
>
> {{{#!diff
> - * @param mixed $value The data value.
> + * @param string $value The data value.
> }}}
>
> It has a mismatch with `wp_script_add_data()` which still indicates the
type of `$value` as being `mixed`.
Thanks for catching that! I guess I was confused by that fact that while
the parameter indeed has a `mixed` type, it's described as a string in
several places:
* "Extra item data (''string'')" in WP_Dependencies::get_data().
* "''String'' containing the data to be added" in `wp_script_add_data()`.
* "''String'' containing the CSS data to be added" in
`wp_style_add_data()`.
Let's revert that change for now and clean up the inconsistencies later.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48303#comment:103>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list