[wp-trac] [WordPress Trac] #32787: make_clickable filter
WordPress Trac
noreply at wordpress.org
Thu Jun 25 09:38:04 UTC 2015
#32787: make_clickable filter
-------------------------+-----------------------------
Reporter: tlexcellent | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 4.2.2
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Hi,
it could be very usefull to add filters to regex callback functions in
make_clickable :
_make_url_clickable
_make_web_ftp_clickable_cb
_make_email_clickable_cb
Example :
{{{
function _make_email_clickable_cb($matches) {
$email = $matches[2] . '@' . $matches[3];
$href = apply_filters( 'make_email_clickable_href', 'mailto:'.$email );
$text = apply_filters( 'make_email_clickable_text', $email );
$html = apply_filters( 'make_email_clickable_html', '<a
href="'.$href.'">'.$text.'</a>' );
return $matches[1] . $html;
}
}}}
Thank you.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32787>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list