[WordPress] 外掛分享: add-rel-lightbox

首頁外掛目錄 › add-rel-lightbox
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
500+
安裝啟用
★★★★★
5/5 分(1 則評價)
4928 天前
最後更新
問題解決
WordPress 3+ v0.4.1 上架:2011-06-30

內容簡介

這是一個 WordPress 的外掛程式,可以自動增加 rel=”lightbox” 屬性到在 WordPress 文章中包含的圖片連結。

這個外掛需求您的網站同時安裝 lightbox 或者 slimbox (或任何相容的圖片處理器)。如果 lightbox 或 add-rel-lightbox 未啟用,您的網站仍可以正常顯示「以新視窗開啟圖片」的效果。

目前這個外掛僅適用於使用 「新增媒體」功能加入文章中的圖片,而且只適用於已經存在於您的媒體庫中的圖片。當然,已經有其他屬性的圖片不會被干擾。

add-rel-lightbox 也可以與 短碼配合使用,為其中的連結增加 rel=”lightbox” 屬性。請注意要選擇「圖像檔案」或使用 的方式呼叫才可以正常使用。而以連結至附件頁面為目的的圖集不會受到此外掛的影響。

除了增加 rel=”lightbox” 屬性之外,這個外掛也會同時讀取圖片的媒體庫標題 (caption),並且正確轉換成 HTML 原始碼,以便在 lightbox 中正常顯示。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.4.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「add-rel-lightbox」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WordPress plugin to automatically add rel=”lightbox” attribute to link wrapped images, as placed into WordPress posts.
This plugin requires lightbox or slimbox (or any lightbox-compatible image handler) to also be installed on your site, either as part of the theme, or via a plugin. If either lightbox, or add-rel-lightbox is not activated at any time, your site will revert gracefully to the standard “open image as new page”.
The plugin currently only works with images placed into posts using the “add media” dialogues, and will only apply to images that are in your media library. However, it will also not interfere with any images that have already have attributes applied to them.
add-rel-lightbox also works with the shortcode, adding the rel=”lightbox” attribute to links created by it. Note that you will have to use the format, or select “Image File” when inserting the gallery for lighbox to work as expected. Galleries that link to the attachment page are unaffected by this plugin.
In addition to applying rel=”lightbox”, this plugin will retrieve the media library caption for any images, and correctly escape any html entities, so that the caption is displayed as expected in the lightbox.

延伸相關外掛

文章
Filter
Mastodon