_make_email_clickable_cb()WP 2.3.2

Callback to convert email address match to HTML A element.

This function was backported from 2.5.0 to 2.3.2. Regex callback for make_clickable().

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Return

String. HTML A element with email address.

Usage

_make_email_clickable_cb( $matches );
$matches(array) (required)
Single Regex Match.

Changelog

Since 2.3.2 Introduced.

_make_email_clickable_cb() code WP 6.5.2

function _make_email_clickable_cb( $matches ) {
	$email = $matches[2] . '@' . $matches[3];

	return $matches[1] . "<a href=\"mailto:{$email}\">{$email}</a>";
}