
內容簡介
Gallery Custom Links 可讓您將相片連結到指定的 URL。已經過 WordPress 相片集、Gutenberg、Meow Gallery 等等的測試。官方網頁在這裡:Gallery Custom Links。
使用方式
兩個欄位會被新增到您的媒體庫中的相片:連結網址和連結目標。若至少設置了連結網址,每當該相片在相片集中使用時,它都會連結到該網址。對於這些相片光箱模式將會自動關閉。
相容性
目前它可以與原生 WP Gallery、Gutenberg 相片集和 Meow Gallery 一起使用。實際上,它應該可以與任何使用“gallery”class 和 Responsive Images (src-set) 的相片集外掛一起使用。如果您希望支援更多相片集,請讓我知道,這應該很容易。
過濾器
您可以透過使用過濾器進行優化(僅在需要時執行外掛程式)和支援更多相片集(透過 CSS class)輕鬆地實現。欲知道更多相關資訊,請參閱官方網頁:Gallery Custom Links。
感謝
建立此外掛程式的動力來自於我的使用者,他們在嘗試使用 WP Gallery Custom Links 時遭遇了問題。我意識到這個外掛程式與標準相片集非常適配,但對於 Gutenberg 和其他相片集需要進行太多的重寫,因此創建了這個外掛程式。我希望它能為您帶來幫助。
語言:英語。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Gallery Custom Links allows you to link images from galleries to a specified URL. Tested with WordPress Gallery, Gutenberg, the Meow Gallery and others. The official page is here: Gallery Custom Links.
Usage
Two fields are added to your images, in your Media Library: Link URL and Link Target (but also, Link Rel and Arial Label). If, at least, the Link URL is set up, this image will link to that URL every time it is used within a gallery. Lightbox will be automatically disabled for those images.
To do this, the Gallery Custom Links needs to analyze/rewrite your content. Depending on your WordPress, you can pick the most appropriate method (known as engine).
HtmlDomParser: Very reliable. It will rewrite your HTML so that the links are hardcoded.
DiDom: Same as HtmlDomParser but faster. However, your HTML needs to be perfectly valid.
Javascript: This is the fastest, but the links won’t be hardcoded. Only the visitor will experience the links.
Compatibility
It currently works with the native WP Gallery, the Gutenberg Gallery, and the Meow Gallery. It should actually work with any gallery plugin using the ‘gallery’ class and Responsive Images (src-set). Let me know if you would like more galleries to be supported, it should be easy.
Filters
You can optimize (run the plugin only on the pages where you need it) and support more galleries (through CSS classes) easily by using filters. To know more about this, visit the official page, here: Gallery Custom Links.
Thanks
The motivation to build this plugin came from my users who had issues trying to use WP Gallery Custom Links. I realized that this plugin was working extremely well with the standard gallery, but would require too much rewriting for Gutenberg and other galleries, hence the creation of this plugin. I hope it will help.
Languages: English.
