#61759 closed enhancement (fixed)
Improve potentially confusing documentation for wp_strip_all_tags()
| Reported by: | coffee2code | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | lowest | Milestone: | 6.7 |
| Component: | Formatting | Version: | 3.9 |
| Severity: | trivial | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
As surfaced in meta#6510 by @krupalpanchal, the inline documentation for wp_strip_all_tags() ends with a sentence that does not have a period at its end. This can give the false impression that the rest of the sentence (and possibly more) has been truncated from its display in DevHub.
This is further complicated by the sentence ending in '', which at quick glance can be seen as a double-quote, giving the additional impression that quoted text is missing. For that reason, and just to be explicit in conveying what the return value will be, the '' should be replaced with an empty string.
In short, I'm suggesting changing
* will return 'something'. wp_strip_all_tags will return ''
to
* will return 'something'. wp_strip_all_tags will return an empty string.
A period was added at the end of the sentence, and '' was replaced with an empty string.
Change History (4)
This ticket was mentioned in PR #7092 on WordPress/wordpress-develop by @coffee2code.
2 years ago
#1
- Keywords has-patch added
@SergeyBiryukov commented on PR #7092:
2 years ago
#4
Thanks for the PR! Merged in r58814.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Explicitly express return value of the example is "an empty string" and add a period to indicate the end of the sentence.