Warning: This function has been deprecated. Use wp_rel_callback() instead.
wp_rel_nofollow_callback() WordPress Function
The wp_rel_nofollow_callback() function enables you to specify whether to add the rel="nofollow" attribute to all links in a given post. This function is useful for preventing comment spam. The function takes two parameters: the first is the content of the post, and the second is an array of all the post's links. The function returns the content with the rel="nofollow" attribute added to all links.
wp_rel_nofollow_callback( array $matches ) #
Callback to add rel="nofollow"
string to HTML A element.
Parameters
- $matches
(array)(Required)Single match.
Return
(string) HTML A Element with rel="nofollow"
.
Source
File: wp-includes/formatting.php
function wp_rel_nofollow_callback( $matches ) { return wp_rel_callback( $matches, 'nofollow' ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.3.0 | Use wp_rel_callback() |
2.3.0 | Introduced. |