wp_kses_normalize_entities3
Callback for wp_kses_normalize_entities() for regular expression.
Description
(string) wp_kses_normalize_entities3( (array) $matches );
This function helps wp_kses_normalize_entities(…)
to only accept valid Unicode numeric entities in hex form.
Returns (string)
Correctly encoded entity
Parameters (1)
- 0. $matches (array)
- Preg_replace_callback(…) matches array
Usage
if ( !function_exists( 'wp_kses_normalize_entities3' ) ) { require_once ABSPATH . WPINC . '/kses.php'; } // preg_replace_callback() matches array $matches = array(); // NOTICE! Understand what this does before running. $result = wp_kses_normalize_entities3($matches);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/kses.php
- function wp_kses_normalize_entities2($matches) {
- if ( empty($matches[1]) )
- return '';
- $i = $matches[1];
- if (valid_unicode($i)) {
- $i = str_pad(ltrim($i, '0'), 3, '0', STR_PAD_LEFT);