#58129 closed defect (bug) (fixed)
Rename the $myHTML parameter in htmlentities2()
| Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.3 |
| Component: | Formatting | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | coding-standards |
Description
There is currently a WPCS warning in wp-includes/formatting.php:
Variable "$myHTML" is not in valid snake_case format, try "$my_h_t_m_l"
Renaming the $myHTML parameter to $text in htmlentities2() should fix the warning.
It would also match other formatting functions with the $text parameter, e.g. esc_html(), ent2ncr(), etc.
Change History (3)
This ticket was mentioned in PR #4327 on WordPress/wordpress-develop by @victoranto.
3 years ago
#1
- Keywords has-patch added; needs-patch removed
@SergeyBiryukov commented on PR #4327:
3 years ago
#3
Thanks for the PR! Merged in r55651.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Rename parameter $myHTML to $text to follow the standard snake_case. Now matches other formating functions like esc_js, esc_html, etc.
Trac ticket: https://core.trac.wordpress.org/ticket/58129#no0