[wp-trac] [WordPress Trac] #61759: Improve potentially confusing documentation for wp_strip_all_tags()

WordPress Trac noreply at wordpress.org
Thu Jul 25 21:55:45 UTC 2024


#61759: Improve potentially confusing documentation for wp_strip_all_tags()
-------------------------+-----------------------------
 Reporter:  coffee2code  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  lowest       |  Milestone:  Awaiting Review
Component:  Formatting   |    Version:  3.9
 Severity:  trivial      |   Keywords:
  Focuses:  docs         |
-------------------------+-----------------------------
 As surfaced in [https://meta.trac.wordpress.org/ticket/6510 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
 [https://developer.wordpress.org/reference/functions/wp_strip_all_tags/
 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`.''

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61759>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list