WP_MatchesMapRegex::callback()publicWP 1.0

preg_replace_callback hook

Method of the class: WP_MatchesMapRegex{}

No Hooks.

Return

String.

Usage

$WP_MatchesMapRegex = new WP_MatchesMapRegex();
$WP_MatchesMapRegex->callback( $matches );
$matches(array) (required)
preg_replace regexp matches

WP_MatchesMapRegex::callback() code WP 6.5.2

public function callback( $matches ) {
	$index = (int) substr( $matches[0], 9, -1 );
	return ( isset( $this->_matches[ $index ] ) ? urlencode( $this->_matches[ $index ] ) : '' );
}