$val) {
if(is_bool($val)) {
$val = $val ? 'true' : 'false';
$init[] = $key.': '.$val;
} elseif(is_numeric($val)) { $init[] = $key.': '.$val;
} else { $init[] = "$key: '$val'"; }
}
// Full-size sliders
if( ( !empty($slides['properties']['attrs']['type']) && $slides['properties']['attrs']['type'] === 'fullsize' ) && ( empty($slides['properties']['attrs']['fullSizeMode']) || $slides['properties']['attrs']['fullSizeMode'] !== 'fitheight' ) ) {
$init[] = 'height: '.$slides['properties']['props']['height'].'';
}
// Popup
if( !empty($slides['properties']['attrs']['type']) && $slides['properties']['attrs']['type'] === 'popup' ) {
$lsPlugins[] = 'popup';
}
if( ! empty( $lsPlugins ) ) {
$init[] = 'plugins: ' . json_encode( array_unique( $lsPlugins ) );
}
$init = implode(', ', $init);
// Fix multiple jQuery issue
$lsInit[] = '';
// Include JS files to body option
if(get_option('ls_put_js_to_body', false)) {
$lsInit[] = '' . NL;
$lsInit[] = '' . NL;
$lsInit[] = '' . NL;
}
$lsInit[] = '';