pre_ent2ncr
Filters text before named entities are converted into numbered entities.
A non-null string must be returned for the filter to be evaluated.
Usage
add_filter( 'pre_ent2ncr', 'wp_kama_pre_ent2ncr_filter', 10, 2 ); /** * Function for `pre_ent2ncr` filter-hook. * * @param string|null $converted_text The text to be converted. * @param string $text The text prior to entity conversion. * * @return string|null */ function wp_kama_pre_ent2ncr_filter( $converted_text, $text ){ // filter... return $converted_text; }
- $converted_text(string|null)
- The text to be converted.
Default: null - $text(string)
- The text prior to entity conversion.
Changelog
Since 3.3.0 | Introduced. |
Where the hook is called
pre_ent2ncr
wp-includes/formatting.php 4101
$filtered = apply_filters( 'pre_ent2ncr', null, $text );