[wp-trac] [WordPress Trac] #32992: Allow make_clickable() to add target="_blank"
WordPress Trac
noreply at wordpress.org
Wed Jul 15 08:18:11 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 | Resolution:
Keywords: | Focuses: ui, accessibility
---------------------------+--------------------------------
Comment (by nicolamustone):
Replying to [comment:5 Daniel Koskinen]:
> @nicolamustone: I'm jumping in with my own thoughts here. Regarding your
example, perhaps in your case it would be fine, but my understanding is
that `make_clickable` is usually meant to be applied to blocks of
arbitrary text where you do not necessarily know what the URL or URL's'
are beforehand (or even if there are any URL's at all, because they're
coming from user-inputted content). They might be even links within the
current site.
>
> If you have a variable containing only a URL, I would suggest simply
wrapping it in HTML yourself.
That makes sense, but in my specific case i use that on a custom field
which could be simple text, numbers, or URLs. In the case that is an URL,
it needs to open in a new window, always.
It's something similar to what you described, but it will only contain one
URL, just i can't know if it's an URL or not, so i can't use HTML
manually.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32992#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list