Java堂  


怎样让WordPress中的链接自动修改为在新窗口中打开?

归档在: Tools, Web&Server — Jet @ 8:34 下午
原文出处: http://www.javatang.com/archives/2007/03/07/3407114.html
作者: Jet Mah from Java堂
声明: 可以非商业性任意转载, 转载时请务必以超链接形式标明文章原始出处、作者信息及此声明!

众所周知,在WordPress中的文章编辑面板中,点击“link”按钮添加的链接在当前窗口中打开,有的时候我们希望在新窗口中打开外部链接。其实很简单,只要修改 /wp-includes/js/quicktags.js 文件就可以了。打开文件之后找到

  1. edButtons[i].tagStart = '<a href="' + URL + '">';

这一行,修改为

  1. edButtons[i].tagStart = '<a href="' + URL + '" target="_blank">';

就可以了。

1 条评论 »

  1. […] 原文来自:http://www.javatang.com/archives/2007/03/07/3407114.html This entry was posted on 星期六, 6月 21st, 2008 at 9:27 上午 and is filed under WP武装. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. […]

    广播 (Pingback) 作者 Junstudo Blog » Blog Archive » 让WordPress中的链接自动修改为在新窗口中打开? — 6月 22, 2008 @ 8:55 上午

发表您的评论