Created
August 1, 2017 10:09
-
-
Save leducson1/383a161e67785cfc37f13b7cff9d0581 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
//* target _blank for comment | |
function comment_links_in_new_tab($text) { | |
$return = str_replace('<a', '<a target="_blank"', $text); | |
return $return; | |
} | |
add_filter('get_comment_author_link', 'comment_links_in_new_tab'); | |
add_filter('comment_text', 'comment_links_in_new_tab'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment