WordPress at a glance
function is not described

_make_web_ftp_clickable_cb() WP 2.3.2

Callback to convert URL match to HTML A element.

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

No Hooks.

Return

String. HTML A element with URL address.

Usage

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

Changelog

Since 2.3.2 Introduced.

Code of make web ftp clickable cb: wp-includes/formatting.php WP 5.2.2

<?php
function _make_web_ftp_clickable_cb( $matches ) {
	$ret  = '';
	$dest = $matches[2];
	$dest = 'http://' . $dest;

	// removed trailing [.,;:)] from URL
	if ( in_array( substr( $dest, -1 ), array( '.', ',', ';', ':', ')' ) ) === true ) {
		$ret  = substr( $dest, -1 );
		$dest = substr( $dest, 0, strlen( $dest ) - 1 );
	}

	$dest = esc_url( $dest );
	if ( empty( $dest ) ) {
		return $matches[0];
	}

	return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>$ret";
}