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

WordPress Trac noreply at wordpress.org
Tue May 31 03:42:43 UTC 2016


#32787: make_clickable filter
-------------------------------------+------------------------------
 Reporter:  tlexcellent              |       Owner:  johnjamesjacoby
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.6
Component:  Formatting               |     Version:  0.71
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:
-------------------------------------+------------------------------

Comment (by johnjamesjacoby):

 [https://core.trac.wordpress.org/attachment/ticket/32787/32787.patch
 32787.patch] does the following:

 * Extracts regular expressions out into their own filters
 * Adds these new filters via `default-filters.php`.

 Things that may need changing:

 * Function names. I used plurals because I think they read better. Also
 suffixed with `_filter` similar to `_cb`.
 * PHP doc. Is `@access private` correct? What about `@internal`?
 * Filters with callbacks kinda stinks, but I think the extra abstraction
 is necessary here.
 * Filter documentation for `make_clickable` filter

 ----

 The end result of this patch, functionality speaking, is identical to
 before it. All we do is add a filter on each piece of `$text` being made
 clickable. This new `make_clickable` filter will allow for plugins to
 introduce their own clickables; specific to BuddyPress, bbPress, and P2,
 this means linking username mentions to their respective profiles.

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


More information about the wp-trac mailing list