-
-
Save danielmcclure/2e9a91d292ea9fe84572215844b514fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Remove the "nofollow" attribute from all comments author's links | |
* except for a specific author. | |
*/ | |
function dofollow_blog_author_comment( $return, $author ) { | |
if ( $author === 'Your Name' ) { | |
$return = str_replace( "rel='external nofollow ugc'", '', $return ); | |
} | |
return $return; | |
} | |
add_filter( 'get_comment_author_link', 'dofollow_blog_author_comment', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment