wordpress评论者链接在新窗口中打开的方法
摘要:找到wp-includes/comment-template.php文件中if(empty($url)||'http://'==$url)$...
找到wp-includes/comment-template.php文件中
if ( empty( $url ) || 'http://' == $url )
$return = $author;
else
$return = "<a href='$url' rel='external nofollow'>$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' target='_blank'>$author</a>";
return apply_filters('get_comment_author_link', $return);
}
【wordpress评论者链接在新窗口中打开的方法】相关文章:
★ wordpress wp_list_categories(分类的链接列表)的使用方法
★ wordpress发布时链接地址依然指向本地而不是域名解决方法