Making WordPress.org

Opened 2 years ago

Closed 2 months ago

#6510 closed defect (bug) (fixed)

wp_strip_all_tags() Developer handbook: Description has something missing at the end.

Reported by: krupalpanchal's profile krupalpanchal Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords: needs-docs
Cc:

Description

It looks like there is something missing at the end of the Description. It should be completing the sentence with the output of wp_strip_all_tags.

Check the below URL:
https://developer.wordpress.org/reference/functions/wp_strip_all_tags/

Change History (3)

#1 @coffee2code
2 months ago

  • Owner set to coffee2code
  • Status changed from new to accepted

Thanks for the report! There are actually two issues at play here.

The first issue is that what is rendered as a curly double-quote should actually be two non-curly single quotes (to denote an empty string). That unfortunate character conversion should be handled by the theme.

The second issue is that even though it looks like there is text missing at the end, there isn't; the inline documentation for wp_strip_all_tags() does not have a period at the end of the sentence. This makes it seem as if text has been omitted. (Additionally, for clarity, the documentation should explicitly say that it returns an empty string.)

For the core change, I would recommend changing

* will return 'something'. wp_strip_all_tags will return ''

to

* will return 'something'. wp_strip_all_tags will return an empty string.

I'll file this second issue on core.trac.

#2 @coffee2code
2 months ago

The core ticket has been created as core#61759.

#3 @coffee2code
2 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in wporg-developer/2117bef:

Formatting: Prevent double single-quotes from being rendered as a curly double-quote.

Double single-quotes always means an empty string.

Props krupalpanchal, coffee2code.
Fixes #6510.

Note: See TracTickets for help on using tickets.