Created
August 28, 2011 19:20
-
-
Save ninetwentyfour/1177082 to your computer and use it in GitHub Desktop.
Remove WordPress’ NoFollow Without A Plugin - blogpost
This file contains hidden or 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
| <?php | |
| function comment_author_link_mine( $comment_ID = 0 ) { | |
| echo get_comment_author_link_mine( $comment_ID ); | |
| } | |
| function get_comment_author_link_mine( $comment_ID = 0 ) { | |
| /** @todo Only call these functions when they are needed. Include in if... else blocks */ | |
| $url = get_comment_author_url( $comment_ID ); | |
| $author = get_comment_author( $comment_ID ); | |
| if ( empty( $url ) || 'http://' == $url ) | |
| $return = $author; | |
| else | |
| $return = "<a href='$url' class='comment_url'>$author</a>"; | |
| return apply_filters('get_comment_author_link', $return); | |
| } | |
| ?> |
This file contains hidden or 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
| <?php comment_author_link(); ?> |
This file contains hidden or 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
| <?php comment_author_link_mine(); ?> |
This file contains hidden or 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
| $return = "<a href='$url' rel='external nofollow' class='url'>$author</a>"; |
This file contains hidden or 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
| $return = "<a href='$url' class='comment_url'>$author</a>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment