Linux 软件免费装

EC Lightbox

开发者 daniloercoli
更新时间 2026年1月21日 01:01
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GNU General Public License v3.0 or later

标签

lightbox galleries

下载

1.1.0

详情介绍:

EC Lightbox is a minimal WordPress plugin that adds a modern lightbox to galleries using GLightbox. The plugin is opt-in by behavior: once activated, it only applies its lightbox functionality to blocks where you explicitly add a custom CSS class (for example, a Gallery block). Everywhere else, WordPress behaves normally. Features Requirements Installation
  1. Install EC Lightbox via the WordPress.org plugin repository or by uploading the files to your server.
  2. Activate EC Lightbox from Plugins → Installed Plugins.
  3. (Optional) Review default options in Settings → EC Lightbox.
The plugin ships with local GLightbox assets already included — no external downloads are required. How to enable EC Lightbox on a Gallery block
  1. Insert a Gallery block.
  2. Select the Gallery block itself (not a single image inside it).
  3. In the block sidebar, configure:
  4. Link toNone
  5. Disable “Open in lightbox” / “Enlarge on click” if present.
  6. Open the Advanced panel.
  7. Add the following class: ec-lightbox
  8. Update or publish the post.
When users click an image inside that gallery, EC Lightbox will open and allow navigation through the gallery. Note: Make sure individual images inside the gallery do not have click settings assigned. If these WP-native actions remain enabled, WordPress will attach its own click/lightbox behavior, overriding this plugin. ⚙️ Settings Page (WordPress Admin) A configuration screen is available at: Settings → EC Lightbox Available options: All settings are passed directly to the lightbox JavaScript on initialization. 🧩 Filters & Developer API 1. Modify GLightbox options programmatically php add_filter( 'ec_lightbox_js_options', function ( $options ) { $options['loop'] = true; $options['zoomable'] = false; $options['openEffect'] = 'zoom'; // Any GLightbox option is accepted return $options; }); Options merged from: 1. Plugin defaults 2. Admin settings 3. This filter (highest priority)