HEX
Server: Apache
System: Linux cpanelx.inxs.ro 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: crowdandsafety (1041)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/crowdandsafety/public_html/wp-content/plugins/cornerstone/includes/shortcodes/lightbox.php
<?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' );