WordPress plugin to automatically add rel=”lightbox” attribute to link wrapped images, as placed into WordPress posts.
WordPress插件可以自动添加rel =“ lightbox”属性来链接包装好的图像(放置在WordPress帖子中)。 p>
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.
此插件需要将灯箱或slimbox(或任何与灯箱兼容的图像处理程序)也作为主题的一部分或通过插件安装在您的网站上。
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”.
如果任何时候都不激活灯箱或add-rel-lightbox,则您的网站将正常还原为标准的“以新页打开图像”。 p>
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.
但是,它也不会不会 em>干扰任何已经应用了属性的图像。 p>add-rel-lightbox also works with the [gallery] shortcode, adding the rel=”lightbox” attribute to links created by it.
add-rel-lightbox也可以与[gallery]短代码一起使用,将rel =“ lightbox”属性添加到它创建的链接中。
Note that you will have to use the [gallery link="file"]
format, or select “Image File” when inserting the gallery for lighbox to work as expected.
请注意,您必须使用 [gallery link =“ file”] code>格式,或在插入图库时选择“图像文件”,以使lighbox正常工作。Galleries that link to the attachment page are unaffected by this plugin.
链接到附件页面的画廊不受此插件的影响。 p>
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.
除了应用rel =“ lightbox”之外,此插件还将检索任何图像的媒体库标题,并正确转义任何html实体,以便在灯箱中按预期显示标题。 p>