Title: Open in New Window Plugin
Author: Keith P. Graham
Published: <strong>2009 年 11 月 24 日</strong>
Last modified: 2024 年 7 月 14 日

---

搜索插件

![](https://ps.w.org/open-in-new-window-plugin/assets/banner-772x250.jpg?rev=654296)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/open-in-new-window-plugin_81927c.svg)

# Open in New Window Plugin

 作者：[Keith P. Graham](https://profiles.wordpress.org/kpgraham/)

[下载](https://downloads.wordpress.org/plugin/open-in-new-window-plugin.3.0.zip)

 * [详情](https://cn.wordpress.org/plugins/open-in-new-window-plugin/#description)
 * [评价](https://cn.wordpress.org/plugins/open-in-new-window-plugin/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/open-in-new-window-plugin/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/open-in-new-window-plugin/#developers)

 [支持](https://wordpress.org/support/plugin/open-in-new-window-plugin/)

## 描述

The Open in New Window Plugin Plugin uses JavaScript to target external links to
a new browser window, leaving your blog page open.
 Since it uses javascript, it
targets more links than using a plugin that filter pages and rewrite the link. The
plugin will find many links generated in scripts or pasted into posts and comments.
Due to the limitations of javascript it will not be able target links in iframes
such as Adsense and some other affiliate links.

### Support

This plugin is free and I expect nothing in return. If you wish to support my programming,
buy my books:
 https://linktr.ee/keithpgraham

## 安装

 1. Download the plugin.
 2. Upload the plugin to your wp-content/plugins directory.
 3. Activate the plugin.

## 评价

![](https://secure.gravatar.com/avatar/58aff5947def01540532681b6980371e27be455d5c8adeb6f60c61424630cbfe?
s=60&d=retro&r=g)

### 󠀁[Works with No Fuss](https://wordpress.org/support/topic/works-with-no-fuss-3/)󠁿

 [CyberCobre](https://profiles.wordpress.org/cybercobre/) 2021 年 2 月 6 日

Install, check the Settings page Settings > Open in New Window and uncheck the images
etc checkbox if you want, and you’re done. Nifty. Works. No fuss.

![](https://secure.gravatar.com/avatar/59044663349af446e2d647da5dfc100e7b367ec2fbb41e55bbdcdbcece14ee6b?
s=60&d=retro&r=g)

### 󠀁[It worked](https://wordpress.org/support/topic/it-worked-56/)󠁿

 [Craig](https://profiles.wordpress.org/catholicservant/) 2019 年 4 月 9 日

Not much to say, but it worked as advertised. 🙂

![](https://secure.gravatar.com/avatar/42488148bdcab033d6886d8cf33c47f1a65a79ce722d4ebcd69152fbe750c290?
s=60&d=retro&r=g)

### 󠀁[Works like a charm!](https://wordpress.org/support/topic/works-like-a-charm-1205/)󠁿

 [peteto2006](https://profiles.wordpress.org/peteto2006/) 2018 年 2 月 24 日

I installed different plugins with that purpose, but none of them worked with my
custom theme. This one works like magic! Thank you! You saved me lots of time!

![](https://secure.gravatar.com/avatar/e08e39e21cc5dc510fca4d909f382776ad0f323ed1068e195bb12214a17c5f4e?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-4352/)󠁿

 [JNashHawkins](https://profiles.wordpress.org/jnashhawkins/) 2017 年 10 月 6 日

Works fine here on Twenty Seventeen Theme and this is a multisite install

![](https://secure.gravatar.com/avatar/8dc8d8bf6d36dd75a0013c1ed39bedb840f0fb2b8248341eeb95984a582dbfc5?
s=60&d=retro&r=g)

### 󠀁[Happy with the way the plugin works](https://wordpress.org/support/topic/works-fine-631/)󠁿

 [O_Breda](https://profiles.wordpress.org/o_breda/) 2018 年 4 月 30 日

I’ve been using this plugin for a few years. I am pleased with the functionality
of the plugin. No problem whatsoever.

![](https://secure.gravatar.com/avatar/e5d3bdca5e4964ec8e5a0924031e01d8407c88d1d9b10f9a57dd3f95e17c2b6f?
s=60&d=retro&r=g)

### 󠀁[It just works!](https://wordpress.org/support/topic/it-just-works-233/)󠁿

 [mavery76266](https://profiles.wordpress.org/mavery76266/) 2016 年 10 月 7 日

There’s not much to say. I installed the plug-in and just like that external links
opened in new tabs. This shouldn’t be necessary since WordPress offers an “Open 
in new window” option when creating a link, but it doesn’t seem to work, so third
party developers have make it work.

 [ 阅读所有16条评价 ](https://wordpress.org/support/plugin/open-in-new-window-plugin/reviews/)

## 贡献者及开发者

「Open in New Window Plugin」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Keith P. Graham ](https://profiles.wordpress.org/kpgraham/)
 *   [ keith graham ](https://profiles.wordpress.org/keith-graham/)

[帮助将「Open in New Window Plugin」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/open-in-new-window-plugin)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/open-in-new-window-plugin/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/open-in-new-window-plugin/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/open-in-new-window-plugin/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/open-in-new-window-plugin/)。

## 更新日志

#### 2.9

 * Tested under WordPress 6.4.2

#### 2.8

 * Tested under WordPress 5.7

#### 2.7

 * Tested under WordPress 5.4

#### 2.6

 * Fixed a bug in the javascript loader url.

#### 2.5

 * Changed comments to /_…_/ so that javascript compressors will not get confused.
 * Fixed bug in the way options are stored.
 * Fixed bug in the way control js was loaded.

#### 2.4

 * Major rewrite.
 * Uses script enqueue methods so WP loads the scripts.
 * Fixed some problems with the scripts. THey should compress correctly now.
 * set up so translations might work (but I doubt it).

#### 2.3

 * Added security check.
 * broke up the program to reduce load overhead
 * added the first settings option to this plugin. Some files types, when found 
   in local site, can be forced to open in a new window. These include: .pdf, .mp3,.
   jpg, .gif, .tiff, .png, .doc, .rtf, .docx, .xls, .wmv, .mov, .avi, .zip, .rar,.
   7z and .arc. Check off the option box in the settings. On by default.

#### 2.2

Fixed bug in javascript that allowed some types to open in new window.

#### 2.1

Added support to load certain file types in a new window. Disabled in wp-admin screens
to prevent reported issues with the admin toolbar.

#### 2.0

Now loading the script as a js file in order to cache the hits and speed page loads.

## 额外信息

 *  版本 **3.0**
 *  最后更新：**2 年前**
 *  活跃安装数量 **2,000+**
 *  WordPress 版本 ** 3.0 或更高版本 **
 *  已测试的最高版本为 **6.6.5**
 *  语言
 * [English (US)](https://wordpress.org/plugins/open-in-new-window-plugin/)
 * 标签
 * [links](https://cn.wordpress.org/plugins/tags/links/)[new window](https://cn.wordpress.org/plugins/tags/new-window/)
   [Open](https://cn.wordpress.org/plugins/tags/open/)[outbound](https://cn.wordpress.org/plugins/tags/outbound/)
 *  [高级视图](https://cn.wordpress.org/plugins/open-in-new-window-plugin/advanced/)

## 评级

 4.8 星（最高 5 星）。

 *  [  15 条 5 星评价     ](https://wordpress.org/support/plugin/open-in-new-window-plugin/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/open-in-new-window-plugin/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/open-in-new-window-plugin/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/open-in-new-window-plugin/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/open-in-new-window-plugin/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/open-in-new-window-plugin/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/open-in-new-window-plugin/reviews/)

## 贡献者

 *   [ Keith P. Graham ](https://profiles.wordpress.org/kpgraham/)
 *   [ keith graham ](https://profiles.wordpress.org/keith-graham/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/open-in-new-window-plugin/)