_make_web_ftp_clickable_cb [ WordPress Functions ]
_make_web_ftp_clickable_cb ( $matches )
| Access: |
|
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
| Codex |
Callback to convert URL match to HTML A element.
This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link make_clickable()}.
Source
function _make_web_ftp_clickable_cb($matches) {
$ret = '';
$dest = $matches[2];
$dest = 'http://' . $dest;
$dest = esc_url($dest);
if ( empty($dest) )
return $matches[0];
// removed trailing [.,;:)] from URL
if ( in_array( substr($dest, -1), array('.', ',', ';', ':', ')') ) === true ) {
$ret = substr($dest, -1);
$dest = substr($dest, 0, strlen($dest)-1);
}
return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>$ret";
}Examples [ wp-snippets.com ]
Top Google Search Results
- make_clickable is not creating title attribute - WordPress Trac
_make_web_ftp_clickable_cb ... $suffix;. _make_web_ftp_clickable_cb. This code ... (for _make_web_ftp_clickable_cb and _make_email_clickable_cb).
core.trac.wordpress.org - Wordpress Hackers - Clickable links filter on FTP hostnames
Dec 14, 2012 ... There's a default filter in WordPress (which eventually is found in the function _make_web_ftp_clickable_cb in wp-includes/formatting.php), ...
wordpress-hackers.1065353.n5.nabble.com - _make_url_clickable_cb (WordPress Function) - WPSeek.com
May 11, 2013 ... @Raja – In the _make_url_clickable_cb, _make_web_ftp_clickable_cb, and _make_email_clickable_cb functions, just add your target attribute ...
wpseek.com - Function to Auto Convert URL into Clickable Hyperlink (Anchor Tag ...
Apr 23, 2013... 0, strlen($url)-1);. } return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a >" . $ret;. } function _make_web_ftp_clickable_cb($matches) { ...
snipplr.com
