wptexturize
wptexturize ( $text, $reset = false )
Parameters:- (string) text The text to be formatted.
- (bool) reset Set to true for unit testing. Translated patterns will reset.
Returns:- (string) The string replaced with HTML entities.
Defined at: - Introduced in WordPress: 0.71
- Deprecated in WordPress: —
Description
Replaces common plain text characters with formatted entities.Returns given text with transformations of quotes into smart quotes, apostrophes,
dashes, ellipses, the trademark symbol, and the multiplication symbol.
As an example,
'cause today's effort makes it worth tomorrow's "holiday" ...
Becomes:
’cause today’s effort makes it worth tomorrow’s “holiday” …
Code within certain HTML blocks are skipped.
Do not use this function before the {@see 'init'} action hook; everything will break.