Title: _make_email_clickable_cb
Published: April 25, 2014
Last modified: May 20, 2026

---

# _make_email_clickable_cb( array $matches ): string

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Callback to convert email address match to HTML A element.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#description)󠁿

This function was backported from 2.5.0 to 2.3.2. Regex callback for [make_clickable()](https://developer.wordpress.org/reference/functions/make_clickable/).

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#parameters)󠁿

 `$matches`arrayrequired

Single Regex Match.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#return)󠁿

 string HTML A element with email address.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#source)󠁿

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

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/formatting.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/formatting.php#L3019)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/formatting.php#L3019-L3023)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/_make_email_clickable_cb/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.3.2](https://developer.wordpress.org/reference/since/2.3.2/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2F_make_email_clickable_cb%2F)
before being able to contribute a note or feedback.