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.


Top ↑

Return

(string) HTML A Element with rel="nofollow".


Top ↑

Source

File: wp-includes/formatting.php

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


Top ↑

Changelog

Changelog
VersionDescription
5.3.0Use wp_rel_callback()
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More