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:

Description

Replaces common plain text characters into formatted entities

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, _get_wptexturize_split_regex, _wptexturize_pushpop_element, wp_ext2type

Top Google Results

User discussions

wpseek mobile