_make_email_clickable_cb

Callback to convert email address match to HTML A element.

Description

(string) _make_email_clickable_cb( (array) $matches ); 

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

Returns (string)

HTML A element with email address.

Parameters (1)

0. $matches (array)
Single Regex Match.

Usage

  1. if ( !function_exists( '_make_email_clickable_cb' ) ) { 
  2. require_once ABSPATH . WPINC . '/formatting.php'; 
  3.  
  4. // Single Regex Match. 
  5. $matches = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _make_email_clickable_cb($matches); 
  9.  

Defined (1)

The function is defined in the following location(s).

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