Title: wp_targeted_link_rel
Published: February 22, 2019
Last modified: February 24, 2026

---

# apply_filters( ‘wp_targeted_link_rel’, string $rel, string $link_html )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#wp--skip-link--target)

Filters the rel values that are added to links with `target` attribute.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#parameters)󠁿

 `$rel`string

The rel values.

`$link_html`string

The matched content of the link tag including all HTML attributes.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#source)󠁿

    ```php
    $rel = apply_filters( 'wp_targeted_link_rel', 'noopener', $link_html );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/formatting.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/formatting.php#L3389)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/formatting.php#L3389-L3389)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_targeted_link_rel_callback()](https://developer.wordpress.org/reference/functions/wp_targeted_link_rel_callback/)`wp-includes/formatting.php` |

Callback to add `rel="noopener"` string to HTML A element.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_targeted_link_rel/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.1.0](https://developer.wordpress.org/reference/since/5.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_targeted_link_rel%2F)
before being able to contribute a note or feedback.