[wp-trac] [WordPress Trac] #32787: make_clickable filter

WordPress Trac noreply at wordpress.org
Mon Jun 29 10:09:24 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                         |  Resolution:
 Keywords:  needs-patch reporter-feedback  |     Focuses:
-------------------------------------------+------------------------------

Comment (by tlexcellent):

 — The email filter could allow to encrypt addresses (via the antispambot()
 or an other function).
 — The url/ftp filter could be used to shorten displayed urls/ftps.

 Maybe it would be easier to have only one filter by callback function,
 with email/url/ftp as a second argument :

 {{{
 function _make_email_clickable_cb($matches) {
   $email = $matches[2] . '@' . $matches[3];
   $html = apply_filters( 'make_email_clickable_html', '<a
 href="'.$href.'">'.$text.'</a>', $email );
   return $matches[1] . $html;
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32787#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list