[wp-trac] [WordPress Trac] #32992: Allow make_clickable() to add target="_blank"
WordPress Trac
noreply at wordpress.org
Tue Jul 14 13:00:05 UTC 2015
#32992: Allow make_clickable() to add target="_blank"
-------------------------------+-----------------------------
Reporter: nicolamustone | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: trunk
Severity: normal | Keywords:
Focuses: ui, accessibility |
-------------------------------+-----------------------------
I use quite often the function make_clickable() but i can't use it like i
would because it does not allow to add the target attribute.
The patch attached adds a second optional attribute to make_clickable() to
allow to add this attribute by passing a bool value to the function (false
by default).
If true, it will perform a str_replace on the HTML anchor before to return
it to add the target="_blank" attribute.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32992>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list