Title: wp_rel_nofollow_callback
Published: April 25, 2014
Last modified: May 20, 2026

---

# wp_rel_nofollow_callback( array $matches ): string

## In this article

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

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

This function has been deprecated since 5.3.0. Use wp_rel_callback() instead.

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

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

 `$matches`arrayrequired

Single match.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_rel_nofollow_callback/?output_format=md#return)󠁿

 string HTML A Element with `rel="nofollow"`.

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

    ```php
    function wp_rel_nofollow_callback( $matches ) {
    	return wp_rel_callback( $matches, 'nofollow' );
    }
    ```

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

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

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

Callback to add a rel attribute to HTML A element.

  |

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

| Version | Description | 
| [5.3.0](https://developer.wordpress.org/reference/since/5.3.0/) | Deprecated. Use [wp_rel_callback()](https://developer.wordpress.org/reference/functions/wp_rel_callback/)  | 
| [2.3.0](https://developer.wordpress.org/reference/since/2.3.0/) | Introduced. |

## User Contributed Notes

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