first commit
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* The admin-specific functionality of the module.
|
||||
*
|
||||
* @link https://codesupply.co
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @package Powerkit
|
||||
* @subpackage Modules/Admin
|
||||
*/
|
||||
|
||||
/**
|
||||
* The admin-specific functionality of the module.
|
||||
*/
|
||||
class Powerkit_Lightbox_Admin extends Powerkit_Module_Admin {
|
||||
|
||||
/**
|
||||
* Initialize
|
||||
*/
|
||||
public function initialize() {
|
||||
add_action( 'admin_init', array( $this, 'register_settings_section' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register admin page
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function register_settings_section() {
|
||||
|
||||
add_settings_section( 'powerkit_lightbox_settings', sprintf( '<span id="%s">%s</span>', powerkit_get_page_slug( $this->slug ), esc_html__( 'Lightbox', 'powerkit' ) ), array( $this, 'powerkit_lightbox_settings_callback' ), 'media' );
|
||||
|
||||
add_settings_field( 'powerkit_lightbox_single_image_selectors', esc_html__( 'Single image selectors', 'powerkit' ), array( $this, 'powerkit_lightbox_single_image_selectors_callback' ), 'media', 'powerkit_lightbox_settings' );
|
||||
add_settings_field( 'powerkit_lightbox_gallery_selectors', esc_html__( 'Gallery selectors', 'powerkit' ), array( $this, 'powerkit_lightbox_gallery_selectors_callback' ), 'media', 'powerkit_lightbox_settings' );
|
||||
add_settings_field( 'powerkit_lightbox_exclude_selectors', esc_html__( 'Exclude selectors', 'powerkit' ), array( $this, 'powerkit_lightbox_exclude_selectors_callback' ), 'media', 'powerkit_lightbox_settings' );
|
||||
add_settings_field( 'powerkit_lightbox_zoom_icon', esc_html__( 'Display Lightbox zoom icon', 'powerkit' ), array( $this, 'powerkit_lightbox_zoom_icon_callback' ), 'media', 'powerkit_lightbox_settings' );
|
||||
|
||||
register_setting( 'media', 'powerkit_lightbox_single_image_selectors' );
|
||||
register_setting( 'media', 'powerkit_lightbox_gallery_selectors' );
|
||||
register_setting( 'media', 'powerkit_lightbox_exclude_selectors' );
|
||||
register_setting( 'media', 'powerkit_lightbox_zoom_icon' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Section Description.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function powerkit_lightbox_settings_callback() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Field | Single Image selectors.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function powerkit_lightbox_single_image_selectors_callback() {
|
||||
?>
|
||||
<textarea class="regular-text" id="powerkit_lightbox_single_image_selectors" name="powerkit_lightbox_single_image_selectors" rows="8"><?php echo esc_attr( get_option( 'powerkit_lightbox_single_image_selectors', '.entry-content img' ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Lightbox will be enabled for images with these CSS classes only. Start every class with a new line.', 'powerkit' ); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Field | Gallery Image selectors.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function powerkit_lightbox_gallery_selectors_callback() {
|
||||
?>
|
||||
<textarea class="regular-text" id="powerkit_lightbox_gallery_selectors" name="powerkit_lightbox_gallery_selectors" rows="8"><?php echo esc_attr( get_option( 'powerkit_lightbox_gallery_selectors', '.wp-block-gallery, .gallery' ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Lightbox will be enabled for images inside containers with these CSS classes. Start every class with a new line.', 'powerkit' ); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Field | Exclude selectors.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function powerkit_lightbox_exclude_selectors_callback() {
|
||||
?>
|
||||
<textarea class="regular-text" id="powerkit_lightbox_exclude_selectors" name="powerkit_lightbox_exclude_selectors" rows="8"><?php echo esc_attr( get_option( 'powerkit_lightbox_exclude_selectors', '' ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Lightbox will be disabled for images with these CSS classes. Start every class with a new line.', 'powerkit' ); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Field | Display on mouse hover only.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function powerkit_lightbox_zoom_icon_callback() {
|
||||
?>
|
||||
<input class="regular-text" id="powerkit_lightbox_zoom_icon" name="powerkit_lightbox_zoom_icon" type="checkbox" value="true" <?php checked( (bool) get_option( 'powerkit_lightbox_zoom_icon', true ) ); ?>>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Lightbox
|
||||
*
|
||||
* @package Powerkit
|
||||
* @subpackage Modules
|
||||
*/
|
||||
|
||||
if ( class_exists( 'Powerkit_Module' ) ) {
|
||||
/**
|
||||
* Init module
|
||||
*/
|
||||
class Powerkit_Lightbox extends Powerkit_Module {
|
||||
|
||||
/**
|
||||
* Register module
|
||||
*/
|
||||
public function register() {
|
||||
$this->name = esc_html__( 'Lightbox', 'powerkit' );
|
||||
$this->desc = esc_html__( 'Instead of opening images in a new window display them in a fullscreen Lightbox for a distraction-free user experience.', 'powerkit' );
|
||||
$this->slug = 'lightbox';
|
||||
$this->type = 'default';
|
||||
$this->category = 'basic';
|
||||
$this->priority = 110;
|
||||
$this->public = true;
|
||||
$this->enabled = true;
|
||||
$this->links = array(
|
||||
array(
|
||||
'name' => esc_html__( 'Go to settings', 'powerkit' ),
|
||||
'url' => admin_url( sprintf( 'options-media.php#%s', powerkit_get_page_slug( $this->slug ) ) ),
|
||||
),
|
||||
array(
|
||||
'name' => esc_html__( 'View documentation', 'powerkit' ),
|
||||
'url' => powerkit_get_setting( 'documentation' ) . '/content-presentation/lightbox/',
|
||||
'target' => '_blank',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize module
|
||||
*/
|
||||
public function initialize() {
|
||||
|
||||
/* Load the required dependencies for this module */
|
||||
|
||||
// Helpers Functions for the module.
|
||||
require_once dirname( __FILE__ ) . '/helpers/helper-powerkit-lightbox.php';
|
||||
|
||||
// Admin and public area.
|
||||
require_once dirname( __FILE__ ) . '/admin/class-powerkit-lightbox-admin.php';
|
||||
require_once dirname( __FILE__ ) . '/public/class-powerkit-lightbox-public.php';
|
||||
|
||||
new Powerkit_Lightbox_Admin( $this->slug );
|
||||
new Powerkit_Lightbox_Public( $this->slug );
|
||||
}
|
||||
}
|
||||
|
||||
new Powerkit_Lightbox();
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Helpers Lightbox
|
||||
*
|
||||
* @package Powerkit
|
||||
* @subpackage Modules/Helper
|
||||
*/
|
||||
|
||||
/**
|
||||
* Lightbox process selectors
|
||||
*
|
||||
* @param string $selectors List selectors.
|
||||
*/
|
||||
function powerkit_lightbox_process_selectors( $selectors = array() ) {
|
||||
|
||||
if ( ! $selectors ) {
|
||||
$selectors = array();
|
||||
}
|
||||
|
||||
if ( is_string( $selectors ) ) {
|
||||
$selectors = str_replace( "\r\n", ',', $selectors );
|
||||
|
||||
$selectors = explode( ',', $selectors );
|
||||
}
|
||||
|
||||
$selectors = array_filter( $selectors, 'strlen' );
|
||||
|
||||
return $selectors;
|
||||
}
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The public-facing functionality of the module.
|
||||
*
|
||||
* @link https://codesupply.co
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @package Powerkit
|
||||
* @subpackage Modules/public
|
||||
*/
|
||||
|
||||
/**
|
||||
* The public-facing functionality of the module.
|
||||
*/
|
||||
class Powerkit_Lightbox_Public extends Powerkit_Module_Public {
|
||||
|
||||
/**
|
||||
* Initialize
|
||||
*/
|
||||
public function initialize() {
|
||||
add_filter( 'wp_kses_allowed_html', array( $this, 'filter_allowed_html' ), 10, 2 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow pinterest data attributes on our links.
|
||||
*
|
||||
* @param array $allowed array The allowed.
|
||||
* @param string $context string The context.
|
||||
*/
|
||||
public function filter_allowed_html( $allowed, $context ) {
|
||||
if ( 'post' === $context ) {
|
||||
$allowed['img']['data-lightbox-description'] = true;
|
||||
}
|
||||
|
||||
return $allowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the stylesheets for the public-facing side of the site.
|
||||
*/
|
||||
public function wp_enqueue_scripts() {
|
||||
// Styles.
|
||||
wp_enqueue_style( 'glightbox', plugin_dir_url( __FILE__ ) . 'css/glightbox.min.css', array(), powerkit_get_setting( 'version' ), 'all' );
|
||||
|
||||
wp_enqueue_style( 'powerkit-lightbox', powerkit_style( plugin_dir_url( __FILE__ ) . 'css/public-powerkit-lightbox.css' ), array(), powerkit_get_setting( 'version' ), 'all' );
|
||||
|
||||
// Add RTL support.
|
||||
wp_style_add_data( 'powerkit-lightbox', 'rtl', 'replace' );
|
||||
|
||||
// Scripts.
|
||||
wp_enqueue_script( 'glightbox', plugin_dir_url( __FILE__ ) . 'js/glightbox.min.js', array( 'jquery', 'imagesloaded' ), powerkit_get_setting( 'version' ), true );
|
||||
|
||||
wp_enqueue_script( 'powerkit-lightbox', plugin_dir_url( __FILE__ ) . 'js/public-powerkit-lightbox.js', array( 'jquery', 'imagesloaded' ), powerkit_get_setting( 'version' ), true );
|
||||
|
||||
$single_image_selectors = get_option( 'powerkit_lightbox_single_image_selectors', array( '.entry-content img' ) );
|
||||
$gallery_selectors = get_option( 'powerkit_lightbox_gallery_selectors', array( '.wp-block-gallery', '.gallery' ) );
|
||||
$exclude_selectors = get_option( 'powerkit_lightbox_exclude_selectors', array() );
|
||||
|
||||
$single_image_selectors = powerkit_lightbox_process_selectors( $single_image_selectors );
|
||||
$gallery_selectors = powerkit_lightbox_process_selectors( $gallery_selectors );
|
||||
$exclude_selectors = powerkit_lightbox_process_selectors( $exclude_selectors );
|
||||
|
||||
$single_image_selectors = apply_filters( 'powerkit_lightbox_image_selectors', $single_image_selectors );
|
||||
$gallery_selectors = apply_filters( 'powerkit_lightbox_gallery_selectors', $gallery_selectors );
|
||||
$exclude_selectors = apply_filters( 'powerkit_lightbox_exclude_selectors', $exclude_selectors );
|
||||
|
||||
wp_localize_script( 'powerkit-lightbox', 'powerkit_lightbox_localize', array(
|
||||
'text_previous' => esc_html__( 'Previous', 'powerkit' ),
|
||||
'text_next' => esc_html__( 'Next', 'powerkit' ),
|
||||
'text_close' => esc_html__( 'Close', 'powerkit' ),
|
||||
'text_loading' => esc_html__( 'Loading', 'powerkit' ),
|
||||
'text_counter' => esc_html__( 'of', 'powerkit' ),
|
||||
'single_image_selectors' => implode( ',', $single_image_selectors ),
|
||||
'gallery_selectors' => implode( ',', $gallery_selectors ),
|
||||
'exclude_selectors' => implode( ',', $exclude_selectors ),
|
||||
'zoom_icon' => get_option( 'powerkit_lightbox_zoom_icon', true ),
|
||||
) );
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+73
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* All of the CSS for your public-facing functionality should be
|
||||
* included in this file.
|
||||
*/
|
||||
/**
|
||||
* Environment for all styles (variables, additions, etc).
|
||||
*/
|
||||
/*--------------------------------------------------------------*/
|
||||
/* Vars */
|
||||
.pk-zoom-icon-popup {
|
||||
--pk-zoom-icon-popup-color: white;
|
||||
--pk-zoom-icon-popup-background: rgba(0, 0, 0, 0.6);
|
||||
--pk-zoom-icon-popup-font-size: 16px;
|
||||
}
|
||||
|
||||
/* Common Style */
|
||||
.pk-lightbox-container {
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.pk-zoom-icon-popup {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pk-zoom-icon-popup:after {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
left: 1rem;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
line-height: 2.5rem;
|
||||
text-align: center;
|
||||
opacity: 0;
|
||||
color: var(--pk-zoom-icon-popup-color);
|
||||
background: var(--pk-zoom-icon-popup-background);
|
||||
transition: all 0.2s ease;
|
||||
font-family: 'powerkit-icons';
|
||||
font-size: var(--pk-zoom-icon-popup-font-size);
|
||||
content: "\e916";
|
||||
}
|
||||
|
||||
.pk-zoom-icon-popup:hover:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.pk-zoom-icon-popup img {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.glightbox-clean .gslide-description {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.glightbox-clean .gdesc-inner {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.glightbox-clean .gslide-title {
|
||||
color: white;
|
||||
font-family: inherit;
|
||||
font-size: 1rem;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.glightbox-clean .gslide-desc {
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
font-family: inherit;
|
||||
font-size: 0.75rem;
|
||||
font-weight: inherit;
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* All of the CSS for your public-facing functionality should be
|
||||
* included in this file.
|
||||
*/
|
||||
/**
|
||||
* Environment for all styles (variables, additions, etc).
|
||||
*/
|
||||
/*--------------------------------------------------------------*/
|
||||
/* Vars */
|
||||
.pk-zoom-icon-popup {
|
||||
--pk-zoom-icon-popup-color: white;
|
||||
--pk-zoom-icon-popup-background: rgba(0, 0, 0, 0.6);
|
||||
--pk-zoom-icon-popup-font-size: 16px;
|
||||
}
|
||||
|
||||
/* Common Style */
|
||||
.pk-lightbox-container {
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.pk-zoom-icon-popup {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pk-zoom-icon-popup:after {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
line-height: 2.5rem;
|
||||
text-align: center;
|
||||
opacity: 0;
|
||||
color: var(--pk-zoom-icon-popup-color);
|
||||
background: var(--pk-zoom-icon-popup-background);
|
||||
transition: all 0.2s ease;
|
||||
font-family: 'powerkit-icons';
|
||||
font-size: var(--pk-zoom-icon-popup-font-size);
|
||||
content: "\e916";
|
||||
}
|
||||
|
||||
.pk-zoom-icon-popup:hover:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.pk-zoom-icon-popup img {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.glightbox-clean .gslide-description {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.glightbox-clean .gdesc-inner {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.glightbox-clean .gslide-title {
|
||||
color: white;
|
||||
font-family: inherit;
|
||||
font-size: 1rem;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.glightbox-clean .gslide-desc {
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
font-family: inherit;
|
||||
font-size: 0.75rem;
|
||||
font-weight: inherit;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,169 @@
|
||||
/**
|
||||
* Lightbox
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
|
||||
$.fn.powerkitLightbox = function( options ) {
|
||||
|
||||
var settings = $.extend( {
|
||||
gallery: false,
|
||||
}, options );
|
||||
|
||||
var objSelector = this;
|
||||
var imageSelector = null;
|
||||
var containerSelector = null;
|
||||
var initGallery = [];
|
||||
|
||||
$( objSelector ).each( function() {
|
||||
var id = Math.random().toString( 36 ).substr( 2, 9 );
|
||||
|
||||
if ( $( this ).is( 'img' ) ) {
|
||||
imageSelector = this;
|
||||
} else {
|
||||
imageSelector = $( this ).find( 'img' );
|
||||
}
|
||||
|
||||
$( imageSelector ).each( function() {
|
||||
|
||||
var container = $( this ).parent();
|
||||
|
||||
if ( !$( container ).is( 'a' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var imagehref = $( container ).attr( 'href' );
|
||||
if ( !imagehref.match( /\.(gif|jpeg|jpg|png|webp)/ ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !( $( container ).closest( 'figure' ).length ) ) {
|
||||
$( container ).wrap( '<figure class="pk-lightbox-container"></figure>' );
|
||||
}
|
||||
|
||||
if ( !$( container ).closest( 'figure' ).hasClass( 'pk-lightbox-container' ) ) {
|
||||
$( container ).closest( 'figure' ).addClass( 'pk-lightbox-container' );
|
||||
}
|
||||
|
||||
// Img classes.
|
||||
var imgClasses = [ 'alignnone', 'aligncenter', 'alignleft', 'alignright' ];
|
||||
|
||||
imgClasses.forEach( function( el ) {
|
||||
if ( $( container ).find( 'img' ).hasClass( el ) ) {
|
||||
$( container ).find( 'img' ).removeClass( el );
|
||||
$( container ).find( 'img' ).closest( 'figure' ).addClass( el );
|
||||
|
||||
// Add width to figure.
|
||||
var imgWidth = $( container ).find( 'img' ).attr( 'width' );
|
||||
|
||||
if ( parseInt( imgWidth ) !== 'NaN' ) {
|
||||
$( container ).find( 'img' ).closest( 'figure' ).width( imgWidth );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
container = $( container ).parent();
|
||||
|
||||
$( '> a', container ).not( '.pk-pin-it' ).addClass( 'pk-image-popup' );
|
||||
|
||||
if ( powerkit_lightbox_localize.zoom_icon ) {
|
||||
$( '> a', container ).not( '.pk-pin-it' ).addClass( 'pk-zoom-icon-popup' );
|
||||
}
|
||||
|
||||
if ( $( objSelector ).is( 'img' ) ) {
|
||||
containerSelector = container;
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
if ( !$( objSelector ).is( 'img' ) ) {
|
||||
containerSelector = this;
|
||||
}
|
||||
|
||||
if ( $( containerSelector ).is( '[data-pk-uuid]' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$( containerSelector ).attr( 'data-pk-uuid', id );
|
||||
|
||||
initGallery[ id ] = GLightbox( {
|
||||
loop: settings.gallery,
|
||||
touchNavigation: true,
|
||||
autoplayVideos: true,
|
||||
selector: `[data-pk-uuid="${id}"] .pk-image-popup`,
|
||||
} );
|
||||
|
||||
initGallery[ id ].on( 'slide_before_load', ( data ) => {
|
||||
const { slideIndex, slideNode, slideConfig, player, trigger } = data;
|
||||
|
||||
let figure = $( trigger ).closest( 'figure' );
|
||||
|
||||
let description = $( figure ).find( 'img' ).data( 'lightbox-description' ) || '';
|
||||
|
||||
if ( !description ) {
|
||||
description = $( figure ).find( '.wp-caption-text' ).text();
|
||||
}
|
||||
|
||||
if ( !description ) {
|
||||
description = $( figure ).find( 'figcaption' ).text();
|
||||
}
|
||||
|
||||
if ( description ) {
|
||||
slideConfig.title = description;
|
||||
}
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
||||
|
||||
function initPowerkitLightbox() {
|
||||
var excludeSelectors = powerkit_lightbox_localize.exclude_selectors;
|
||||
var imageSelectors = powerkit_lightbox_localize.single_image_selectors;
|
||||
var gallerySelectors = powerkit_lightbox_localize.gallery_selectors
|
||||
|
||||
// Exclude.
|
||||
var filterSelectors = null;
|
||||
|
||||
var filterPowerkitLightbox = function() {
|
||||
if ( filterSelectors ) {
|
||||
if ( $( this ).closest( filterSelectors ).length > 0 ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Single Init -----------------------------------
|
||||
$( imageSelectors ).imagesLoaded( function() {
|
||||
var exSplit = excludeSelectors.split( ',' );
|
||||
var glSplit = gallerySelectors.split( ',' );
|
||||
|
||||
// Join exclude selectors.
|
||||
filterSelectors = exSplit.concat( glSplit ).filter( function( value ) {
|
||||
return !!value;
|
||||
} ).filter( function( value ) {
|
||||
return !this[ value ] && ( this[ value ] = true );
|
||||
}, Object.create( null ) ).join( ',' );
|
||||
|
||||
// Init.
|
||||
$( imageSelectors ).filter( filterPowerkitLightbox ).powerkitLightbox();
|
||||
} );
|
||||
|
||||
// Gallery Init -----------------------------------
|
||||
$( gallerySelectors ).imagesLoaded( function() {
|
||||
filterSelectors = excludeSelectors;
|
||||
|
||||
// Init.
|
||||
$( gallerySelectors ).filter( filterPowerkitLightbox ).powerkitLightbox( { gallery: true } );
|
||||
} );
|
||||
}
|
||||
|
||||
$( document ).ready( function() {
|
||||
initPowerkitLightbox();
|
||||
|
||||
$( document.body ).on( 'post-load image-load', function() {
|
||||
initPowerkitLightbox();
|
||||
} );
|
||||
} );
|
||||
|
||||
} )( jQuery );
|
||||
Reference in New Issue
Block a user