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

_make_email_clickable_cb() WordPress Function

The make_email_clickable_cb() function is a custom function used to convert email addresses into clickable links. This function is used by the WordPress email system to automatically convert email addresses into clickable links when they are entered into the system. This function is useful for making sure that email addresses are clickable and accessible from anywhere on the WordPress site.

_make_email_clickable_cb( array $matches ) #

Callback to convert email address match to HTML A element.


Description

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


Top ↑

Parameters

$matches

(array)(Required)Single Regex Match.


Top ↑

Return

(string) HTML A element with email address.


Top ↑

Source

File: wp-includes/formatting.php

function _make_email_clickable_cb( $matches ) {
	$email = $matches[2] . '@' . $matches[3];
	return $matches[1] . "<a href=\"mailto:$email\">$email</a>";
}

Top ↑

Changelog

Changelog
VersionDescription
2.3.2Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.