這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

External Linker

描述

You know how target="_blank" is invalid in XHTML strict? Well, this plugin uses a Javascript hack to get around this. The code was originally taken from this thread I came across: http://www.webmasterworld.com/forum21/11165.htm

For posts/pages, the plugin will automatically captures any target="_blank"‘s inserted by the WP editor and modifies them to keep the page XHTML Strict valid. Then some small Javascript is inserted into each page which re-inserts target="_blank" so that the functionality is restored after your page has been validated!

For non-post/page content (eg templates/widgets), simply give your outbound links a class name of external, and the rest will be done automatically while keeping your page XHTML valid.

To Do

Future things I plan to add:

  • Integration into WP edit page to allow use of plugin without manually editing HTML.

安裝

  1. Upload/Copy plugin to your blog.
  2. Activate it.

  3. In posts & pages, links containing target="_blank" will be handled automatically. (This can be turned off by setting EXTERNAL_LINKER_USE_FILTER to false in the plugin file.)

  4. For templates & widgets, instead of using target="_blank" simply give your links a class name of external. (This name can be changed by editing EXTERNAL_LINKER_CLASS_NAME in the plugin file.)

常見問題

How does this affect my styles/CSS?

Not at all. The external class name is not used for any styling purposes, and you can just combine it with whatever class names you’re already using, eg: class="external my-other-class"

Does this work on admin pages?

No, it only modifies links on non-admin pages (this is by design).

Can I change the required class name from `external`?

Yes, simply open external-linker.php and change the EXTERNAL_LINKER_CLASS_NAME constant.

Can I turn off the automatic post filter?

Yes, simply open external-linker.php and change the EXTERNAL_LINKER_USE_FILTER constant to false.

評價

There are no reviews for this plugin.

貢獻者及開發者

“External Linker” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 External Linker 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.2

  • Added automatic post filter.

0.1

  • Creation of plugin!