WP_MatchesMapRegex::callback( array $matches ): string

In this article

preg_replace_callback hook

Parameters

$matchesarrayrequired
preg_replace regexp matches

Return

string

Source

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

User Contributed Notes

You must log in before being able to contribute a note or feedback.