Make WordPress Core

Opened 8 weeks ago

Closed 8 weeks ago

Last modified 8 weeks ago

#61759 closed enhancement (fixed)

Improve potentially confusing documentation for wp_strip_all_tags()

Reported by: coffee2code's profile coffee2code Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.7 Priority: lowest
Severity: trivial Version: 3.9
Component: Formatting Keywords: has-patch
Focuses: docs Cc:

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.


8 weeks ago
#1

  • Keywords has-patch added

Explicitly express return value of the example is "an empty string" and add a period to indicate the end of the sentence.

#2 @SergeyBiryukov
8 weeks ago

  • Milestone changed from Awaiting Review to 6.7
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
8 weeks ago

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

In 58814:

Docs: Clarify the description for wp_strip_all_tags().

Follow-up to [11929], [27042].

Props coffee2code, krupalpanchal, mukesh27.
Fixes #61759.

@SergeyBiryukov commented on PR #7092:


8 weeks ago
#4

Thanks for the PR! Merged in r58814.

Note: See TracTickets for help on using tickets.