wptexturize ( $text, $reset = false )

  • (string) text The text to be formatted.
  • (bool) reset Set to true for unit testing. Translated patterns will reset.
  • (string) The string replaced with HTML entities.
Defined at:


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.

Related Functions

wptexturize_primes, wp_text_diff, _wptexturize_pushpop_element, wp_ext2type, wp_filesize

Top Google Results

User discussions

wpseek mobile