Comments on: Open comment author link in new window http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/ Sun, 22 Mar 2015 14:44:25 +0000 hourly 1 http://wordpress.org/?v=4.1.1 By: Ade http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-239164 Thu, 19 Dec 2013 18:58:08 +0000 http://www.studiograsshopper.ch/?p=1373#comment-239164 Yes, that should work, though there may be a slight performance hit thanks to preg_replace(). We’re talking about a very, very small hit though.

]]>
By: drivingralle http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-239071 Mon, 09 Dec 2013 17:05:11 +0000 http://www.studiograsshopper.ch/?p=1373#comment-239071 What do you think about this way?

function drivingralle_edit_comment_author_link( $input ) {
// Add target=”_blank” to the link
$input = preg_replace(‘/(<a href[^]+)>/is’, ‘\\1 target=”_blank”>’, $input);
//return the modified string
return $input;
}
add_filter( ‘get_comment_author_link’, ‘drivingralle_edit_comment_author_link’ );

]]>
By: Comment Author link to Open in New Window ・NetWebbing.com http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-238528 Tue, 06 Aug 2013 01:11:37 +0000 http://www.studiograsshopper.ch/?p=1373#comment-238528 […] I found my (partial) solution from Studiograsshopper’s “Open comment author link in new window“. […]

]]>
By: Jim Rush http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-225621 Thu, 21 Feb 2013 20:26:11 +0000 http://www.studiograsshopper.ch/?p=1373#comment-225621 Thanks for the code, it works like a charm!

]]>
By: Arsie http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-87405 Sat, 02 Jun 2012 15:29:00 +0000 http://www.studiograsshopper.ch/?p=1373#comment-87405 Thanks for this. I will try this code on my blog sites.

]]>
By: Stefan Jakolin http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-33136 Sat, 06 Aug 2011 17:13:10 +0000 http://www.studiograsshopper.ch/?p=1373#comment-33136 Thank you alot for that Information.

In German here:

http://www.azella.de/blog/2011/08/wordpress-kommentarlinks-als-_blank/

]]>
By: WordPress: Kommentarlinks als _blank | azella.de/blog http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-33120 Sat, 06 Aug 2011 10:02:20 +0000 http://www.studiograsshopper.ch/?p=1373#comment-33120 […] Dank an Studiograsshopper. Ähnliche Artikel:Wordpress: Generator Tag entfernenNofollow LinksGoogle lenken, die […]

]]>
By: Zach http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-23202 Fri, 07 Jan 2011 19:44:20 +0000 http://www.studiograsshopper.ch/?p=1373#comment-23202 Thank, dude! Appreciate your work, this works like a charm :)

]]>
By: Ade http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-18134 Mon, 06 Sep 2010 17:06:43 +0000 http://www.studiograsshopper.ch/?p=1373#comment-18134 Thanks for posting this, Henry. :-)

]]>
By: Henry http://www.studiograsshopper.ch/code-snippets/open-comment-author-link-in-new-window/#comment-18131 Mon, 06 Sep 2010 16:02:12 +0000 http://www.studiograsshopper.ch/?p=1373#comment-18131 * look like the parser did not interpret the {code} tag correctly. Going to try again…
...
if ( empty( $url ) || 'http://' == $url )
$return = "{cite class='fn'}$author{/cite}";
else
$return = "{cite class='fn' title='$url'}{a href='$url' title='$author' class='url' rel='external nofollow' target='_blank'}$author{/a}{/cite}";
return $return;

]]>