解决Mnews主题评论者网站地址获取问题

折腾完Mnews主题评论者Gravatar头像问题,后发现一个问题:未注册用户留言时留下网站链接,点击留言者名字时不会打开网站链接,反而跳到author主页,这明显就是个bug

comment-ajax.php

修改comment-ajax.php文件中大概第22行代码:

  1. <span class="author_name"><?php global $salongif($user_id){ echo '<a href="'.get_author_posts_url($user_id).'" class="url">'.$user_name.'</a>'; }else if ($salong['switch_link_go']) {commentauthor();} else {comment_author_link();} ?></span><?php _e( '发布于:', 'salong' ); ?>&nbsp;<time class="datetime"><?php echo get_comment_date().'&nbsp;'.get_comment_time() ?></time>

替换成以下代码:

  1. <span class="author_name"><?php global $salongif($user_id){ echo '<a href="'.get_comment_author_url().'" class="url">'.$user_name.'</a>'; }else if ($salong['switch_link_go']) {commentauthor();} else {comment_author_link();} ?></span><?php _e( '发布于:', 'salong' ); ?>&nbsp;<time class="datetime"><?php echo get_comment_date().'&nbsp;'.get_comment_time() ?></time>

效果截图
解决Mnews主题评论者网站地址获取问题

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
搜索