好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

wordpress评论者链接在新窗口中打开的方法

找到wp-includes/comment-template.php文件中

 

复制代码

代码如下:


if ( empty( $url ) || 'http://' == $url )
$return = $author;
else
$return = "<a href='$url' rel='external nofollow' class='url'>$author</a>";
return apply_filters('get_comment_author_link', $return);
}

 

给$return值上加个target=’_blank’
 

复制代码

代码如下:


if ( empty( $url ) || 'http://' == $url )
$return = $author;
else
$return = "<a href='$url' rel='external nofollow' class='url' target='_blank'>$author</a>";
return apply_filters('get_comment_author_link', $return);
}

查看更多关于wordpress评论者链接在新窗口中打开的方法的详细内容...

  阅读:41次