Core Function
View Source on Trac ↗ links_add_target()
links_add_target( mixed $content, mixed $target = '_blank', mixed $tags = array('a') ) Adds a target attribute to all links in passed content.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $content string | String to search for links in. Required |
| $target string | The target to add to the links. |
| $tags string[] | An array of tags to apply to. |
Return Value
(string)
The processed content.
Function Information
Since Version
2.7.0
Source File
wp-includes/formatting.php
Advertisement