pre_ent2ncr

Filters text before named entities are converted into numbered entities.

Description

apply_filters( 'pre_ent2ncr', (null) $null, (string) $text ); 

A non-null string must be returned for the filter to be evaluated.

Parameters (2)

0. $null (null) => null
The text to be converted. Default null.
1. $text (string)
The text prior to entity conversion.

Usage

To run the hook, copy the example below.
  1. $null = apply_filters( 'pre_ent2ncr', $null, $text ); 
  2.  
  3. if ( !empty( $null ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the pre_ent2ncr callback 
  2. function filter_pre_ent2ncr( $null, $text ) { 
  3. // make filter magic happen here... 
  4. return $null
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'pre_ent2ncr', 'filter_pre_ent2ncr', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'pre_ent2ncr', 'filter_pre_ent2ncr', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/formatting.php  
  1. $filtered = apply_filters( 'pre_ent2ncr', null, $text );