| Server IP : 172.67.159.97 / Your IP : 216.73.217.154 Web Server : nginx/1.24.0 System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/rebeccaone.com/wp-content/plugins/cornerstone/includes/shortcodes/ |
Upload File : |
<?php
// Lightbox
// =============================================================================
function x_shortcode_lightbox( $atts ) {
extract( shortcode_atts( array(
'selector' => '',
'deeplink' => '',
'opacity' => '',
'prev_scale' => '',
'prev_opacity' => '',
'next_scale' => '',
'next_opacity' => '',
'orientation' => '',
'thumbnails' => ''
), $atts, 'x_lightbox' ) );
static $count = 0; $count++;
// @TODO move _ilightbox.scss from using content: for font awesome
do_action("cs_fa_add_webfont_styles");
wp_enqueue_script( 'cs-ilightbox' );
$js_params = array(
'selector' => ( $selector != '' ) ? $selector : '.x-img-link',
'deeplink' => ( $deeplink == 'true' ),
'opacity' => ( $opacity != '' ) ? $opacity : '0.85',
'prevScale' => ( $prev_scale != '' ) ? $prev_scale : '0.85',
'prevOpacity' => ( $prev_opacity != '' ) ? $prev_opacity : '0.65',
'nextScale' => ( $next_scale != '' ) ? $next_scale : '0.85',
'nextOpacity' => ( $next_opacity != '' ) ? $next_opacity : '0.65',
'orientation' => ( $orientation != '' ) ? $orientation : 'horizontal',
'thumbnails' => ( $thumbnails == 'true' )
);
$data = cs_generate_data_attributes( 'lightbox', $js_params, true );
$output = "<span id=\"x-lightbox-{$count}\" {$data}></span>";
return $output;
}
add_shortcode( 'x_lightbox', 'x_shortcode_lightbox' );