$value) {
if (in_array($key, ['speed', 'timeout', 'fx', 'pause', 'layout', 'strip-style', 'controls', 'columns'])) {
$data_attr .= 'data-photonic-'.$key.'="'.esc_attr($value).'" ';
}
}
$style = empty($short_code['style']) ? (empty($short_code['layout']) ? '' : $short_code['layout']) : $short_code['style'];
$title_position = empty($short_code['title_position']) ? $options['title_position'] : $short_code['title_position'];
$ret = "
\n";
$ret .= "\t
\n";
foreach ( $photos as $photo ) {
$ret .= "\t\t- \n";
$title = esc_attr($photo['title']);
$description = esc_attr($photo['description']);
if ($short_code['caption'] == 'desc' || ($short_code['caption'] == 'title-desc' && empty($title)) || ($short_code['caption'] == 'desc-title' && !empty($description))) {
$title = $description;
}
else if (($short_code['caption'] == 'desc-title' && empty($title)) || $short_code['caption'] == 'none') {
$title = '';
}
if (!isset($photo['video'])) {
if ($title_position == 'tooltip') {
$tooltip = 'data-photonic-tooltip="'.esc_attr($title).'" ';
}
else {
$tooltip = '';
}
$ret .= "\t\t\t
\n";
}
else {
$ret .="\t\t";
}
$shown_title = '';
if (in_array($title_position, ['below', 'hover-slideup-show', 'hover-slidedown-show', 'slideup-stick']) && !empty($title)) {
$shown_title = "\t\t\t".''."\n\t\t\t\t".'
'.wp_specialchars_decode($title, ENT_QUOTES).'
'."\n\t\t\t".'
'."\n";
}
if (!empty($title)) {
$ret .= $shown_title;
}
$ret .= "\t\t \n";
}
$ret .= "\t
\n
\n";
return $ret;
}
}