[wp-trac] [WordPress Trac] #18268: Add tel, sms, callto and fax protocols to esc_url() and make the array filterable

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 13 01:11:59 UTC 2012


#18268: Add tel, sms, callto and fax protocols to esc_url() and make the array
filterable
------------------------------------+---------------------
 Reporter:  sanchothefat            |       Owner:
     Type:  enhancement             |      Status:  closed
 Priority:  normal                  |   Milestone:  3.3
Component:  Formatting              |     Version:  3.2.1
 Severity:  normal                  |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |
------------------------------------+---------------------

Comment (by georgestephanis):

 Just added a modification of the `wp_allowed_protocols()` function -- as-
 is, if you call the function once, say, in a plugin for whatever reason,
 the static is set and the filter triggers, and no other plugins / theme
 stuff / whatever will be able to add a filter, as empty() will always be
 false.

 I like optimizing things as much as the next guy and caching it with
 static, but we could potentially be caching bad data.

 Perhaps leave it as a static, and call doing_it_wrong() if they activate
 it before a certain point, to ensure everyone at the table has an
 opportunity to attach filters?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18268#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list