{"id":267844,"date":"2026-01-20T16:34:57","date_gmt":"2026-01-20T16:34:57","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ec-lightbox\/"},"modified":"2026-01-20T16:35:48","modified_gmt":"2026-01-20T16:35:48","slug":"ec-lightbox","status":"publish","type":"plugin","link":"https:\/\/ne.wordpress.org\/plugins\/ec-lightbox\/","author":2481469,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.0","stable_tag":"1.1.0","tested":"6.9.4","requires":"6.7","requires_php":"7.4","requires_plugins":null,"header_name":"EC Lightbox","header_author":"Danilo Ercoli","header_description":"Optional lightbox for images and galleries using GLightbox, activated via a custom CSS class on blocks.","assets_banners_color":"","last_updated":"2026-01-20 16:35:48","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/ercoliconsulting.eu","header_author_uri":"https:\/\/danilo.blog","rating":0,"author_block_rating":0,"active_installs":0,"downloads":114,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":{"1.1.0":{"tag":"1.1.0","author":"daniloercoli","date":"2026-01-20 16:35:48"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":3443453,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":3443453,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[4918,237],"plugin_category":[50],"plugin_contributors":[77516],"plugin_business_model":[],"class_list":["post-267844","plugin","type-plugin","status-publish","hentry","plugin_tags-galleries","plugin_tags-lightbox","plugin_category-media","plugin_contributors-daniloercoli","plugin_committers-daniloercoli"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/ec-lightbox\/assets\/icon-128x128.jpg?rev=3443453","icon_2x":"https:\/\/ps.w.org\/ec-lightbox\/assets\/icon-256x256.jpg?rev=3443453","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>EC Lightbox is a minimal WordPress plugin that adds a modern lightbox to galleries using <a href=\"https:\/\/github.com\/biati-digital\/glightbox\">GLightbox<\/a>.<\/p>\n\n<p>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.<\/p>\n\n\n\n<h3>Features<\/h3>\n\n<ul>\n<li>Uses <a href=\"https:\/\/github.com\/biati-digital\/glightbox\">GLightbox<\/a> for a clean, responsive lightbox.<\/li>\n<li>Works with WordPress core blocks (e.g. Gallery, Image).<\/li>\n<li>Opt-in activation via a custom CSS class (<code>ec-lightbox<\/code>).<\/li>\n<li>Groups images by gallery container (each block with <code>ec-lightbox<\/code> is its own gallery).<\/li>\n<li>Includes a <strong>Settings page<\/strong> in WordPress Admin.<\/li>\n<li>Configurable behavior: loop, touch navigation, zoom.<\/li>\n<li>Local vendor assets by default (no hard dependency on external CDNs).<\/li>\n<\/ul>\n\n\n\n<h3>Requirements<\/h3>\n\n<ul>\n<li>WordPress 5.0+<\/li>\n<li>PHP 7.0+<\/li>\n<li>A block-based setup (Gutenberg) is recommended.<\/li>\n<\/ul>\n\n\n\n<h3>How to enable EC Lightbox on a Gallery block<\/h3>\n\n<ol>\n<li>Insert a <strong>Gallery<\/strong> block.<\/li>\n<li>Select the <strong>Gallery block itself<\/strong> (not a single image inside it).<\/li>\n<li>In the block sidebar, configure:\n\n<ul>\n<li><strong>Link to<\/strong> \u2192 <code>None<\/code><\/li>\n<li>Disable <strong>\u201cOpen in lightbox\u201d \/ \u201cEnlarge on click\u201d<\/strong> if present.<\/li>\n<\/ul><\/li>\n<li>Open the <strong>Advanced<\/strong> panel.<\/li>\n<li><p>Add the following class:\nec-lightbox<\/p><\/li>\n<li><p>Update or publish the post.<\/p><\/li>\n<\/ol>\n\n<p>When users click an image inside that gallery, EC Lightbox will open and allow navigation through the gallery.<\/p>\n\n<p>Note:\nMake sure individual images inside the gallery do <strong>not<\/strong> have click settings assigned.\nIf these WP-native actions remain enabled, WordPress will attach its own click\/lightbox behavior, overriding this plugin.<\/p>\n\n\n\n<h3>\u2699\ufe0f Settings Page (WordPress Admin)<\/h3>\n\n<p>A configuration screen is available at:<\/p>\n\n<p><strong>Settings \u2192 EC Lightbox<\/strong><\/p>\n\n<p>Available options:<\/p>\n\n<ul>\n<li><strong>Loop images<\/strong>  <\/li>\n<li><strong>Enable touch navigation<\/strong>  <\/li>\n<li><strong>Enable zoom<\/strong>  <\/li>\n<li><strong>Autoplay videos<\/strong> (for future video support)<\/li>\n<\/ul>\n\n<p>All settings are passed directly to the lightbox JavaScript on initialization.<\/p>\n\n\n\n<h3>\ud83e\udde9 Filters &amp; Developer API<\/h3>\n\n<h3>1. Modify GLightbox options programmatically<\/h3>\n\n<pre><code>`php\n<\/code><\/pre>\n\n<p>add_filter( 'ec_lightbox_js_options', function ( $options ) {\n    $options['loop'] = true;\n    $options['zoomable'] = false;\n    $options['openEffect'] = 'zoom';   \/\/ Any GLightbox option is accepted\n    return $options;\n});\n    `\nOptions merged from:\n1. Plugin defaults\n2. Admin settings\n3. This filter (highest priority)<\/p>\n\n<!--section=installation-->\n<ol>\n<li><p>Install EC Lightbox via the WordPress.org plugin repository or by uploading the files to your server.<\/p><\/li>\n<li><p>Activate <strong>EC Lightbox<\/strong> from <strong>Plugins \u2192 Installed Plugins<\/strong>.<\/p><\/li>\n<li><p>(Optional) Review default options in <strong>Settings \u2192 EC Lightbox<\/strong>.<\/p><\/li>\n<\/ol>\n\n<p>The plugin ships with local GLightbox assets already included \u2014 no external downloads are required.<\/p>","raw_excerpt":"EC Lightbox is a minimal WordPress plugin that adds a modern lightbox to galleries using GLightbox.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/267844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=267844"}],"author":[{"embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/daniloercoli"}],"wp:attachment":[{"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=267844"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=267844"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=267844"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=267844"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=267844"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ne.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=267844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}