[WordPress] 外掛分享: External Links in New Window / New Tab

首頁外掛目錄 › External Links in New Window / New Tab
WordPress 外掛 External Links in New Window / New Tab 的封面圖片
30,000+
安裝啟用
★★★★
4.5/5 分(77 則評價)
102 天前
最後更新
問題解決
WordPress 4.0+ PHP 5.2+ v1.45 上架:2010-09-23

內容簡介

這個外掛可以在新分頁或新視窗中開啟外部連結。您可以設定強制開啟新視窗的網址或忽略某些連結不開啟新分頁。

此外掛程式產生的代碼符合 XHTML Strict 規範,並且經過搜尋引擎優化(SEO)。
這是通過使用 JavaScript 的 window.open() 函數實現的。它僅在頁面中添加了幾行原始的 JavaScript 代碼,不需要任何外部庫,如 jQuery。

大多數其他插件通過修改 target 參數(即 <a href="http://somewhere.example" target="_blank">)來實現,該方法不符合 XHTML Strict 規範。
此外掛程式在客戶端處理連結,因此可以讓搜尋引擎正確跟踪連結。此外,如果瀏覽器不支持 JavaScript,該外掛程式將保持不活動,不會產生任何錯誤。

如果您需要更高級的外掛程式,帶有更多選項,可以嘗試我們的 免費 WP External Links 插件。

致謝
受到 Zap_NewWindow 插件的啟發,該插件由 Tom Köhler 開發。
橫幅是由 Monja Da Riva 拍攝的 照片。

翻譯
丹麥語由 Kristian Risager Larsen 翻譯
荷蘭語由 Paul Staring 翻譯
立陶宛語由 Vincent G 翻譯
其他翻譯將不勝感激!

已知錯誤
此外掛程式與其他更改連結“onClick”屬性的插件產生衝突。

原始開發人員
Kristian Risager Larsen - kezze.dk

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.45) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「External Links in New Window / New Tab」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Opens external links in a new tab or a or new window. You can set URLs that should either be forced to open in a new window or ignored.
The plugin produces XHTML Strict compliant code and is search engine optimized (SEO).
This is done using JavaScript’s window.open()-function. It adds only a few lines of vanilla JavaScript to the page, and does not require any external libraries like jQuery.
Most other plugins perform a hack by altering the target parameter (i.e. ). That method is not XHTML Strict compliant.
This plugin handles the links client-side, which lets search engines follow the links properly. Also, if a browser does not support JavaScript, the plugin is simply inactive, and does not result in any errors.
If you need a more advanced plugin, with more options try our free WP External Links plugin.
Credits
Inspired by the Zap_NewWindow plugin by Tom Köhler.
The banner is a photo by Monja Da Riva.
Translations
Danish by Kristian Risager Larsen
Dutch by Paul Staring
Lithuanian by Vincent G
Other translations will be appreciated!
Known bugs
The plugin conflicts with other plugins that change the links’ `onClick´ attribute.
Original developer
Kristian Risager Larsen – kezze.dk

延伸相關外掛

文章
Filter
Apply Filters
Mastodon