开发者 |
Martin von Berg
martinvonberg |
---|---|
更新时间 | 2024年11月17日 00:21 |
捐献地址: | 去捐款 |
PHP版本: | 7.4 及以上 |
WordPress版本: | 6.7 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
"wp-block-embed-youtube"
in the file plugin-settings.json
. If you do so please delete the comma at the end of the line before, too!
See live example here: https://www.berg-reise-foto.de/software-wordpress-lightroom-plugins/wordpress-plugins-fotos-und-karten/
The support for Youtube-Videos is working with the given functionality and extended to stop running videos onOpen and for the paid version to stop running videos on slideChange.
Plugin is filtering the content of posts and pages and appends lightbox effect for native Gutenberg-Blocks: Image, Gallery, Media-and-Text, Featured Image, Video and Youtube-Video. It also works for external images or YT-videos that are not on your site.
Maybe, see preconditions above. If your theme provides output that is NOT stored as content in the database it will not work. If your media ( be it image or video ) is not given in a figure tag it will not work. Positive feedback is reported from Beaver Builder, Post Types of Advanced Custom Fields. Negative feedback is given by GeneratePress that generates page content in special elements by the theme files. So, just try if it works and mind the preconditions.
The settings are written in a separate file 'plugin-settings.json' in the main plugin folder. Change here the type of posts, pages which shall include the lightbox. Additionally change whether existing links to Media-Files should be overwritten and which CSS-Classes should be used for the fslightbox. In the JSON file, you can select which link may already be present on the image (hrefTypes : Empty, Media). In addition, it can be set for which pages or posts the lightbox should be activated (postTypes). The selection of the actual media type is done with the CSS class that is used for the image or video (cssClassesToSearch). With excludeIDs you can set which posts / pages should not be equipped with a lightbox. Reasonable basic settings have been chosen, so there should be no reason to change them at the beginning.
Yes, you may buy the fslightbox.js an add the file fslightbox.js to the folder ./folder-where-the-plugin-is-installed/js/fslightbox-paid. That's it.
No. You can use this plugin with pure WordPress with Gutenberg editor enabled. But mind the preconditions above.
Yes. Lightbox is fully responsive - it scales to every device.
No. Plugin just uses fslightbox.js. Free or paid version optionally.
Yes, the Update to 2.0.0 implements a backup / restore logic for plugin-settings.json
and the files in ./js/fslightbox-paid. This will work ONLY for all future updates because the php-files have to be on your server already. So, with this update it is the last time you have to save your files in advance. The process creates the folder ../simple-lightbox-fslight-backup
in you Plugin-Directory which won't be deleted after Update. If you want the backup-restore process running with the Update to V2.0.0 you have to manually copy the files simple-lightbox-fslight.php
and ./admin/pre-post-install.php
from Github via ftp to your server. The backup / restore logic won't work if you install the Plugin manually as zip-File.
Yes, there are errors shown like "The service worker navigation preload request was cancelled before 'preloadResponse' settled. If you intend to use 'preloadResponse', use waitUntil() or respondWith() to wait for the promise to settle". This issue is not solvable by me. If you dislike it: Just delete the JS-File simple-lightbox.min.js
. The Video Sync will no longer work after that.
= Why does it not work with flickr images?
You might add "wp-block-embed-flickr" but the lightbox does not open? That is, because flickr image blocks contain a link to the image on the flickr website. The Gutenberg block does not have an option to change this. The plugin functionality does NOT change existing links, because this is usually intentionally.
= Why does it not work with featured images?
Featured images are not stored in the database as content. The plugin does usuallay not filter the content of post, page etc. So, add the option "rewriteScope": "body" to the settings.json file. See example settings file in ./settings/plugin-settings-body.json.
= Does it work with AVIF image format?
Yes, it does!