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.
Использование
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(строка|null)
- The text to be converted.
По умолчанию: null - $text(строка)
- The text prior to entity conversion.
Список изменений
С версии 3.3.0 | Введена. |
Где вызывается хук
pre_ent2ncr
wp-includes/formatting.php 4100
$filtered = apply_filters( 'pre_ent2ncr', null, $text );