wpseek.com
WordPress开发者和主题制作者的搜索引擎



_make_email_clickable_cb › WordPress Function

Since2.3.2
已弃用n/a
_make_email_clickable_cb ( $matches )
访问:
  • private
参数:
  • (array) $matches Single Regex Match.
    Required: Yes
返回:
  • (string) HTML A element with email address.
定义在:
文档:

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().


源码

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

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