WP_MatchesMapRegex::callback
preg_replace_callback hook
Method of the class: WP_MatchesMapRegex{}
No Hooks.
Returns
String.
Usage
$WP_MatchesMapRegex = new WP_MatchesMapRegex(); $WP_MatchesMapRegex->callback( $matches );
- $matches(array) (required)
- preg_replace regexp matches.
WP_MatchesMapRegex::callback() WP MatchesMapRegex::callback code WP 6.8.3
public function callback( $matches ) {
$index = (int) substr( $matches[0], 9, -1 );
return ( isset( $this->_matches[ $index ] ) ? urlencode( $this->_matches[ $index ] ) : '' );
}