first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,149 @@
(function ($) {
/**
* initMap
*
* Renders a Google Map onto the selected jQuery element
*
* @date 22/10/19
* @since 5.8.6
*
* @param jQuery $el The jQuery element.
* @return object The map instance.
*/
function initMap($el) {
// Find marker elements within map.
var $markers = $el.find('.marker');
// Create gerenic map.
var mapArgs = {
zoom: $el.data('zoom') || 16,
mapTypeId: google.maps.MapTypeId.ROADMAP,
styles: $el.data('style') || [],
};
var map = new google.maps.Map($el[0], mapArgs);
// Add markers.
map.markers = [];
$markers.each(function () {
initMarker($(this), map);
});
// Center map based on markers.
centerMap(map);
// Return map instance.
return map;
}
/**
* initMarker
*
* Creates a marker for the given jQuery element and map.
*
* @date 22/10/19
* @since 5.8.6
*
* @param jQuery $el The jQuery element.
* @param object The map instance.
* @return object The marker instance.
*/
function initMarker($marker, map) {
var iconData = $marker.data('marker'),
iconImage = iconData;
if (iconData.charAt(0) === '#') {
var markerSvg = [
'<?xml version="1.0"?>',
'<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg">',
'<path fill="' + iconData + '" d="M32,4.75c-10.401,0-18.833,8.432-18.833,18.833c0,3.345,0.898,6.474,2.428,9.195c0.254,0.452,0.52,0.897,0.809,1.325L32,61.25l15.596-27.146c0.24-0.355,0.447-0.732,0.662-1.104l0.148-0.221c1.528-2.721,2.427-5.85,2.427-9.195C50.833,13.182,42.401,4.75,32,4.75z M32,14.167c5.2,0,9.417,4.216,9.417,9.417c0,5.2-4.216,9.417-9.417,9.417s-9.417-4.216-9.417-9.417S26.799,14.167,32,14.167z M32,12c-6.501,0-11.771,5.27-11.771,11.771c0,6.5,5.27,11.771,11.771,11.771c6.5,0,11.771-5.271,11.771-11.771C43.771,17.271,38.5,12,32,12z M32,16.708c3.901,0,7.063,3.162,7.063,7.063S35.901,30.834,32,30.834s-7.063-3.162-7.063-7.063S28.099,16.708,32,16.708z"/>',
'<path fill="#000000" fill-opacity="0.3" d="M32,12c-6.501,0-11.771,5.27-11.771,11.771c0,6.5,5.27,11.771,11.771,11.771c6.5,0,11.771-5.271,11.771-11.771C43.771,17.271,38.5,12,32,12z M32,16.708c3.901,0,7.063,3.162,7.063,7.063S35.901,30.834,32,30.834s-7.063-3.162-7.063-7.063S28.099,16.708,32,16.708z"/>',
'</svg>'
].join('\n');
iconImage = 'data:image/svg+xml;charset=UTF-8,' + encodeURIComponent(markerSvg);
}
// Get position from marker.
var lat = $marker.data('lat');
var lng = $marker.data('lng');
var icon = {
url: iconImage,
scaledSize: new google.maps.Size(75, 75)
};
var latLng = {
lat: parseFloat(lat),
lng: parseFloat(lng)
};
// Create marker instance.
var marker = new google.maps.Marker({
position: latLng,
map: map,
icon: icon
});
// Append to reference for later use.
map.markers.push(marker);
// If marker contains HTML, add it to an infoWindow.
if ($marker.html()) {
// Create info window.
var infowindow = new google.maps.InfoWindow({
content: $marker.html()
});
// Show info window when marker is clicked.
google.maps.event.addListener(marker, 'click', function () {
infowindow.open(map, marker);
});
}
}
/**
* centerMap
*
* Centers the map showing all markers in view.
*
* @date 22/10/19
* @since 5.8.6
*
* @param object The map instance.
* @return void
*/
function centerMap(map) {
// Create map boundaries from all map markers.
var bounds = new google.maps.LatLngBounds();
map.markers.forEach(function (marker) {
bounds.extend({
lat: marker.position.lat(),
lng: marker.position.lng()
});
});
// Case: Single marker.
if (map.markers.length == 1) {
map.setCenter(bounds.getCenter());
// Case: Multiple markers.
} else {
map.fitBounds(bounds);
// or for change zoom:
// map.setCenter( bounds.getCenter() );
// map.setZoom( 13 );
}
}
// Render maps on page load.
$(document).ready(function () {
$('.acf-map').each(function () {
var map = initMap($(this));
});
});
})(jQuery);

View File

@@ -0,0 +1,188 @@
<?php
/**
* Modules | Map Google
*
* @package Dotspice
* @version 1.3.0
*/
if (defined('DOTSPICE_MAP_GOOGLE_ENABLE') && DOTSPICE_MAP_GOOGLE_ENABLE) {
/**
* Map Google | Admin | Post Type
*/
function dotspice_mg_post_type($post_types)
{
$post_types[] = array(
'post_type' => 'map-google',
'menu_name' => esc_html__('Maps', 'dotspice'),
'singular_name' => esc_html__('Map', 'dotspice'),
'multiple_name' => esc_html__('Maps', 'dotspice'),
'show_in_menu' => 'theme-settings',
'public' => false,
'publicly_queryable' => false,
'menu_icon' => 'dashicons-location-alt',
'supports' => array('title')
);
return $post_types;
}
add_filter('dotspice_cpt', 'dotspice_mg_post_type');
/**
* Map Google | Admin | Scortcode
*/
function dotspice_mg_get_shortcode($post_id)
{
if (!empty($post_id)) {
$shortcode = '[map-google ids="' . $post_id . '"]';
echo '<span class="shortcode wp-ui-highlight"><input type="text"'
. ' onfocus="this.select();" readonly="readonly"'
. ' value="' . esc_attr($shortcode) . '"'
. ' class="large-text code" /></span>';
}
}
/**
* Map Google | Admin | After Title
*/
function dotspice_mg_add_shortcode_after_title($post)
{
if ($post->post_type === 'map-google') {
dotspice_mg_get_shortcode($post->ID);
}
}
add_action('edit_form_after_title', 'dotspice_mg_add_shortcode_after_title');
/**
* Map Google | Admin | Post Type Columns
*/
function dotspice_mg_add_columns($columns)
{
$columns = array_slice($columns, 0, 2, true) + array('shortcode' => __('Shortcode', 'dotspice')) + array_slice($columns, 2, count($columns) - 2, true);
if (isset($columns['pur'])) {
unset($columns['pur']);
}
return $columns;
}
add_filter('manage_map-google_posts_columns', 'dotspice_mg_add_columns', 99);
function dotspice_mg_manage_columns($column_name, $post_id)
{
if ($column_name == 'shortcode') {
dotspice_mg_get_shortcode($post_id);
}
return $column_name;
}
add_filter('manage_map-google_posts_custom_column', 'dotspice_mg_manage_columns', 10, 2);
/**
* Slider Swiper | Admin | Register Google API key
*/
function dotspice_mg_register_api_key()
{
acf_update_setting('google_api_key', 'AIzaSyArV6CtaMQvN44fC3OR8fs8TXyuSvITukk');
}
add_action('acf/init', 'dotspice_mg_register_api_key');
/**
* Map Google | Shortcode
*/
function dotspice_mg_shortcode($atts)
{
if (is_feed()) {
return '[map-google]';
}
if (!class_exists('acf_pro')) {
return '[map-google 404 "Advanced Custom Fields PRO"]';
}
$atts = shortcode_atts(array(
'ids' => ''
), $atts);
$markers = array();
// Post
$post_IDs = wp_parse_id_list($atts['ids']);
$theme_colors = dotspice_get_theme_option('colors');
$marker_color = !empty($theme_colors['primary']) ? $theme_colors['primary'] : '#EA4335';
if (empty($post_IDs)) {
$post_IDs = get_posts(array(
'fields' => 'ids',
'posts_per_page' => -1,
'post_type' => 'map-google'
));
if (empty($post_IDs)) {
return '[map-google 404 "IDs"]';
}
}
foreach ($post_IDs as $post_ID) {
$post = get_post($post_ID);
if (empty($post)) {
return '[map-google 404 "post ' . esc_attr($post_ID) . '"]';
}
if ($post->post_status != 'publish') {
return '[map-google post_status ' . esc_attr($post_ID) . ' "' . esc_attr($post->post_status) . '"]';
}
if ($post->post_type != 'map-google') {
return '[map-google post_type ' . esc_attr($post_ID) . ' "' . esc_attr($post->post_type) . '"]';
}
$markers[] = array(
'marker' => get_field('marker', $post_ID) ? get_field('marker', $post_ID) : esc_attr($marker_color),
'content' => get_field('content', $post_ID),
'location' => get_field('location', $post_ID),
);
}
if (empty($markers)) {
return '[map-google 404 "markers"]';
}
// Google Map
ob_start();
$map_default_zoom = dotspice_get_theme_option('map_default_zoom') ?: '12';
$map_default_multiple_zoom = dotspice_get_theme_option('map_default_multiple_zoom') ?: '17';
$map_default_style = dotspice_get_theme_option('google_maps_json') ?: '[]';
?>
<div class="acf-map" data-style='<?php echo $map_default_style; ?>' data-zoom="<?php echo $map_default_zoom; ?>" data-zoom-multiple="<?php echo $map_default_multiple_zoom; ?>">
<?php
foreach ($markers as $marker) {
echo sprintf(
'<div class="marker" data-lat="%s" data-lng="%s" data-marker="%s">%s</div>',
esc_attr($marker['location']['lat']),
esc_attr($marker['location']['lng']),
esc_attr($marker['marker']),
wp_kses_post($marker['content'])
);
}
?>
</div>
<?php
$map_html = ob_get_clean();
// Enqueue Scripts
wp_enqueue_script('map-google-googleapis', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyArV6CtaMQvN44fC3OR8fs8TXyuSvITukk', array(), '', true);
wp_enqueue_script('map-google', get_template_directory_uri() . '/includes/modules/map-google/js/map-google.js', array('jquery'), '', true);
// Output
return $map_html;
}
add_shortcode('map-google', 'dotspice_mg_shortcode');
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,479 @@
<?php
/**
* Modules | Slider Swiper
*
* @package Dotspice
* @version 1.3.0
*/
if (defined('DOTSPICE_SLIDER_SWIPER_ENABLE') && DOTSPICE_SLIDER_SWIPER_ENABLE) {
/**
* Slider Swiper | Admin | Post Type
*/
function dotspice_ss_post_type($post_types)
{
$post_types[] = array(
'post_type' => 'slider-swiper',
'menu_name' => esc_html__('Sliders', 'dotspice'),
'singular_name' => esc_html__('Slider', 'dotspice'),
'multiple_name' => esc_html__('Sliders', 'dotspice'),
'show_in_menu' => 'theme-settings',
'public' => false,
'publicly_queryable' => false,
'menu_icon' => 'dashicons-images-alt',
'supports' => array('title')
);
return $post_types;
}
add_filter('dotspice_cpt', 'dotspice_ss_post_type');
/**
* Slider Swiper | Admin | Scortcode
*/
function dotspice_ss_get_shortcode($post_id)
{
if (!empty($post_id)) {
$shortcode = '[slider-swiper id="' . $post_id . '"]';
echo '<span class="shortcode wp-ui-highlight"><input type="text"'
. ' onfocus="this.select();" readonly="readonly"'
. ' value="' . esc_attr($shortcode) . '"'
. ' class="large-text code" /></span>';
}
}
/**
* Slider Swiper | Admin | After Title
*/
function dotspice_ss_add_shortcode_after_title($post)
{
if ($post->post_type === 'slider-swiper') {
dotspice_ss_get_shortcode($post->ID);
}
}
add_action('edit_form_after_title', 'dotspice_ss_add_shortcode_after_title');
/**
* Slider Swiper | Admin | Post Type Columns
*/
function dotspice_ss_add_columns($columns)
{
$columns = array_slice($columns, 0, 2, true) + array('shortcode' => __('Shortcode', 'dotspice')) + array_slice($columns, 2, count($columns) - 2, true);
if (isset($columns['pur'])) {
unset($columns['pur']);
}
return $columns;
}
add_filter('manage_slider-swiper_posts_columns', 'dotspice_ss_add_columns', 99);
function dotspice_ss_manage_columns($column_name, $post_id)
{
if ($column_name == 'shortcode') {
dotspice_ss_get_shortcode($post_id);
}
return $column_name;
}
add_filter('manage_slider-swiper_posts_custom_column', 'dotspice_ss_manage_columns', 10, 2);
/**
* Slider Swiper | Shortcode
*/
function dotspice_ss_shortcode($atts)
{
if (is_feed()) {
return '[slider-swiper]';
}
if (!class_exists('acf_pro')) {
return '[slider-swiper 404 "Advanced Custom Fields PRO"]';
}
$atts = shortcode_atts(array(
'id' => 0
), $atts);
$query_error_message = false;
// Post
$post_ID = (int) $atts['id'];
$post = get_post($post_ID);
if (empty($post_ID)) {
return '[slider-swiper 404 "ID"]';
}
if (empty($post)) {
return '[slider-swiper 404 "post"]';
}
if ($post->post_status != 'publish') {
return '[slider-swiper post_status "' . esc_attr($post->post_status) . '"]';
}
if ($post->post_type != 'slider-swiper') {
return '[slider-swiper post_type "' . esc_attr($post->post_type) . '"]';
}
// Slider
$slider_type = get_field('slider_type', $post_ID);
$slides_field = ($slider_type != 'default') ? '_' . $slider_type : '';
$slides = get_field('slides' . $slides_field, $post_ID);
$classes = array('swiper-slider', 'swiper-container', $post->post_name, 'type-' . $slider_type);
$slide_ID = 'swiper-' . $post->post_name;
if (!is_array($slides) || count($slides) <= 0) {
return '[slider-swiper 404 "slides"]';
}
// Settings
$settings = get_field('settings', $post_ID);
$params = array(
'slidesPerView' => !empty($settings['per_view']) ? (float) $settings['per_view'] : 1,
'spaceBetween' => !empty($settings['space_between']) ? (int) $settings['space_between'] : 0,
'loop' => !empty($settings['loop']) ? (bool) $settings['loop'] : false,
'speed' => !empty($settings['speed']) ? (int) $settings['speed'] : 300,
'loopAdditionalSlides' => 5
);
// Settings | Autoplay
if (!empty($settings['autoplay'])) {
$params['autoplay'] = array(
'delay' => (int) $settings['autoplay'],
);
}
// Settings | Effect
$effect_field = ($params['slidesPerView'] > 1) ? 'effect_multiple' : 'effect';
$params['effect'] = !empty($settings[$effect_field]) ? esc_attr($settings[$effect_field]) : 'slide';
// Settings | Breakpoints
if ($params['slidesPerView'] > 1) {
$classes[] = 'grid';
$per_view = $params['slidesPerView'];
$per_view_lg = !empty($settings['per_view_lg']) ? (float) $settings['per_view_lg'] : 1;
$per_view_md = !empty($settings['per_view_md']) ? (float) $settings['per_view_md'] : 1;
$per_view_sm = !empty($settings['per_view_sm']) ? (float) $settings['per_view_sm'] : 1;
$params['slidesPerView'] = $per_view_sm;
$params['breakpoints'] = array(
'576' => array(
'slidesPerView' => $per_view_md,
),
'768' => array(
'slidesPerView' => $per_view_lg,
),
'992' => array(
'slidesPerView' => $per_view,
),
);
// Hidden elems Fix
$params['observer'] = true;
$params['observeParents'] = true;
}
// Settings | Navigation
if (!empty($settings['navigation'])) {
$params['navigation'] = array(
'nextEl' => '.' . esc_attr($slide_ID) . '-button-next',
'prevEl' => '.' . esc_attr($slide_ID) . '-button-prev'
);
}
// Settings | Scrollbar
if (!empty($settings['scrollbar']) && !$settings['loop']) {
$params['scrollbar'] = array(
'el' => '.' . esc_attr($slide_ID) . '-scrollbar',
'draggable' => true
);
}
// Settings | Pagination
if (!empty($settings['pagination']) && $settings['pagination'] != 'none') {
$params['pagination'] = array(
'el' => '.' . esc_attr($slide_ID) . '-pagination',
'clickable' => true,
'type' => esc_attr($settings['pagination'])
);
}
// Settings | Auto Height
if (!in_array($slider_type, array('default', 'custom'))) {
$params['autoHeight'] = true;
}
ob_start();
?>
<div class="swiper-box">
<div id="<?php echo esc_attr($slide_ID); ?>" class="<?php echo implode(' ', $classes); ?>">
<div class="swiper-wrapper">
<?php
$count = 1;
$add_css = '';
switch ($slider_type) {
// Posts
case 'post':
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => get_field('per_page', $post_ID),
);
// Taxonomies
if ($slides_type == 'taxonomy') {
$slides_tax = !empty($slides['taxonomy']) ? $slides['taxonomy'] : array();
$args['tax_query'] = array(
array(
'taxonomy' => 'category',
'field' => 'term_id',
'terms' => wp_parse_id_list($slides_tax),
),
);
}
// Custom
if ($slides_type == 'custom') {
$slides_posts = !empty($slides['custom']) ? $slides['custom'] : array();
$args['post__in'] = wp_parse_id_list($slides_posts);
$args['orderby'] = 'post__in';
}
$query = new WP_Query($args);
if ($query->have_posts()) {
while ($query->have_posts()) : $query->the_post();
?><div class="swiper-slide slide slide-<?php echo esc_attr($count); ?>"><?php
get_template_part('templates/content');
?></div><?php
$count++;
endwhile;
} else {
$query_error_message = 'posts';
}
wp_reset_postdata();
break;
// Products
case 'product':
if (class_exists('woocommerce')) {
$slides_type = !empty($slides['type']) ? $slides['type'] : '';
$args = array(
'post_type' => esc_attr($slider_type),
'posts_per_page' => get_field('per_page', $post_ID),
'post_status' => 'publish',
);
// Featured
if ($slides_type == 'featured') {
$args['post__in'] = wp_parse_id_list(wc_get_featured_product_ids());
}
// Best Selling
if ($slides_type == 'best_selling') {
$args['meta_key'] = 'total_sales';
$args['order'] = 'DESC';
$args['orderby'] = 'meta_value_num';
}
// Taxonomies
if ($slides_type == 'taxonomy') {
$slides_tax = !empty($slides['taxonomy']) ? $slides['taxonomy'] : array();
$args['tax_query'] = array(
array(
'taxonomy' => 'product_cat',
'field' => 'term_id',
'terms' => wp_parse_id_list($slides_tax),
),
);
}
// Custom
if ($slides_type == 'custom') {
$slides_posts = !empty($slides['custom']) ? $slides['custom'] : array();
$args['post__in'] = wp_parse_id_list($slides_posts);
}
// Sort
if (!empty($args['post__in'])) {
$args['orderby'] = 'post__in';
}
$query = new WP_Query($args);
if ($query->have_posts()) {
while ($query->have_posts()) : $query->the_post();
?><div class="swiper-slide slide slide-<?php echo esc_attr($count); ?>"><?php
wc_get_template_part('content', 'product');
?></div><?php
$count++;
endwhile;
} else {
$query_error_message = 'products';
}
wp_reset_postdata();
}
break;
// Product Categories
case 'product_cat':
if (class_exists('woocommerce')) {
$slides_type = !empty($slides['type']) ? $slides['type'] : '';
$args = array(
'taxonomy' => array('product_cat'),
'number' => get_field('per_page', $post_ID),
'hide_empty' => false
);
// Taxonomies
if ($slides_type == 'custom') {
$slides_tax = !empty($slides['taxonomy']) ? $slides['taxonomy'] : array();
$args['include'] = wp_parse_id_list($slides_tax);
$args['orderby'] = 'include';
}
$categories = get_terms($args);
if (!empty($categories)) {
foreach ($categories as $category) {
?><div class="swiper-slide slide slide-<?php echo esc_attr($count); ?>"><?php
wc_get_template('content-product_cat.php', array('category' => $category));
$count++;
?></div><?php
}
}
}
break;
// Default | Custom
default:
foreach ($slides as $slide) :
?>
<div class="swiper-slide slide slide-<?php echo esc_attr($count); ?>">
<?php get_template_part('includes/modules/slider-swiper/templates/template', $slider_type, $slide); ?>
</div>
<?php
if (!empty($slide['bg_image']) || !empty($slide['bg_color'])) {
$add_css .= '#' . esc_attr($slide_ID) . ' .slide-' . esc_attr($count) . '{';
$add_css .= !empty($slide['bg_image']) ? 'background-image: url("' . $slide['bg_image'] . '");' : '';
$add_css .= !empty($slide['bg_color']) ? 'background-color: ' . $slide['bg_color'] . ';' : '';
$add_css .= '}';
}
$count++;
endforeach;
break;
}
?>
</div>
</div>
<?php
// Disable slider, when count of slides < slidesPerView
if (isset($params['breakpoints']['992']['slidesPerView'])) {
if (intval($params['breakpoints']['992']['slidesPerView']) > ($count - 1)) {
$params['loop'] = false;
$settings['navigation'] = false;
}
}
?>
<?php
if (!empty($settings['navigation'])) :
$navigation_btn = !empty($settings['navigation_btn']) ? $settings['navigation_btn'] : 'default';
$btn_left = '';
$btn_right = '';
$btn_style = false;
switch ($navigation_btn) {
case 'none':
break;
case 'default':
$btn_left = 'slider-left';
$btn_right = 'slider-right';
$btn_style = false;
break;
default:
$btn_data = explode('-', $navigation_btn);
$btn_left = $btn_data[0] . '-left';
$btn_right = $btn_data[0] . '-right';
if (isset($btn_data[1])) {
$btn_left .= '-' . $btn_data[1];
$btn_right .= '-' . $btn_data[1];
}
if (isset($btn_data[2])) {
$btn_left .= '-' . $btn_data[2];
$btn_right .= '-' . $btn_data[2];
}
break;
}
?>
<div class="container">
<div class="swiper-button swiper-button-prev <?php echo esc_attr($slide_ID); ?>-button-prev"><?php echo (!empty($btn_left)) ? dotspice_get_svg_icon($btn_left, 'html', array('style' => $btn_style)) : ''; ?></div>
<div class="swiper-button swiper-button-next <?php echo esc_attr($slide_ID); ?>-button-next"><?php echo (!empty($btn_right)) ? dotspice_get_svg_icon($btn_right, 'html', array('style' => $btn_style)) : ''; ?></div>
</div>
<?php
endif;
?>
<?php if (!empty($settings['scrollbar']) && !$settings['loop']) : ?>
<div class="swiper-scrollbar <?php echo esc_attr($slide_ID); ?>-scrollbar"></div>
<?php endif; ?>
<?php if (!empty($settings['pagination']) && $settings['pagination'] != 'none') : ?>
<div class="swiper-pagination <?php echo esc_attr($slide_ID); ?>-pagination"></div>
<?php endif; ?>
</div>
<?php
$slider_html = ob_get_clean();
// Check WP_Query
if (!empty($query_error_message)) {
return '[slider-swiper 404 "' . esc_attr($query_error_message) . '"]';
}
// Enqueue Scripts
wp_enqueue_script('swiper-bundle', get_template_directory_uri() . '/includes/modules/slider-swiper/js/swiper-bundle.min.js', array('jquery'), '', true);
// Enqueue Dynamic Scripts
add_action('wp_footer', function () use ($slide_ID, $params) {
wp_add_inline_script('swiper-bundle', 'new Swiper( "#' . esc_attr($slide_ID) . '" , ' . json_encode($params) . ');');
});
// Enqueue Styles
wp_enqueue_style('swiper-bundle', get_template_directory_uri() . '/includes/modules/slider-swiper/css/swiper-bundle.min.css', array(), null);
// Enqueue Dynamic Styles
if (!empty($add_css)) {
wp_add_inline_style('swiper-bundle', dotspice_minify_css($add_css));
}
// Output
return $slider_html;
}
add_shortcode('slider-swiper', 'dotspice_ss_shortcode');
}

View File

@@ -0,0 +1,11 @@
<div class="slide__content">
<?php
// HTML
if ( ! empty( $args['html'] ) ) {
printf( '<div class="slide__html">%1$s</div>',
wp_kses( do_shortcode( $args['html'] ), 'dotspice-svg' )
);
}
?>
</div>

View File

@@ -0,0 +1,110 @@
<div class="slide__container container">
<div class="slide__content">
<?php
$subtitle_tag = !empty($args['subtitle_tag']) ? $args['subtitle_tag'] : 'div';
$title_tag = !empty($args['title_tag']) ? $args['title_tag'] : 'div';
// Subtitle
if (!empty($args['subtitle'])) {
printf(
'<%1$s class="slide__sub-h">%2$s</%1$s>',
esc_attr($subtitle_tag),
wp_kses($args['subtitle'], 'dotspice-svg')
);
}
// Title
if (!empty($args['title'])) {
printf(
'<%1$s class="slide__h">%2$s</%1$s>',
esc_attr($title_tag),
wp_kses($args['title'], 'dotspice-svg')
);
}
// Description
if (!empty($args['desc'])) {
printf(
'<div class="slide__desc">%1$s</div>',
wp_kses($args['desc'], 'dotspice-svg')
);
} ?>
<?php if (!empty($args['buttons_list'])) {
?><div class="slide__button-wrap">
<?php
foreach ($args['buttons_list'] as $button) {
?><a class="slide__button button" href="
<?php echo esc_attr($button['url']); ?>" <?php
if ($button['target'] == 'blank') {
?> target="_blank" <?php
}
?>>
<?php echo wp_kses(do_shortcode($button['text']), 'dotspice-svg'); ?></a>
<?php
}
?></div>
<?php
}
?>
</div>
<div class="slide__content">
<?php
$subtitle_tag = !empty($args['subtitle_tag_kopia']) ? $args['subtitle_tag_kopia'] : 'div';
$title_tag = !empty($args['title_tag_kopia']) ? $args['title_tag_kopia'] : 'div';
// Subtitle
if (!empty($args['subtitle_kopia'])) {
printf(
'<%1$s class="slide__sub-h">%2$s</%1$s>',
esc_attr($subtitle_tag),
wp_kses($args['subtitle_kopia'], 'dotspice-svg')
);
}
// Title
if (!empty($args['title_kopia'])) {
printf(
'<%1$s class="slide__h">%2$s</%1$s>',
esc_attr($title_tag),
wp_kses($args['title_kopia'], 'dotspice-svg')
);
}
// Description
if (!empty($args['desc_kopia'])) {
printf(
'<div class="slide__desc">%1$s</div>',
wp_kses($args['desc_kopia'], 'dotspice-svg')
);
} ?>
<?php if (!empty($args['buttons_list_kopia'])) {
?><div class="slide__button-wrap">
<?php
foreach ($args['buttons_list_kopia'] as $button) {
?><a class="slide__button button" href="
<?php echo esc_attr($button['url']); ?>" <?php
if ($button['target'] == 'blank') {
?> target="_blank" <?php
}
?>>
<?php echo wp_kses(do_shortcode($button['text']), 'dotspice-svg'); ?></a>
<?php
}
?></div>
<?php
}
?>
</div>
<div id="scroll_down">
<a href="#wrapper"><span></span></a>
</div>
<div id="social__buttons">
<a target="_blank" href="https://www.facebook.com/fabiolatorebki/"><?php echo do_shortcode('[svg icon="facebook-f-fa"]'); ?></a>
<a target="_blank" href="https://www.instagram.com/fabiola_torebki/"><?php echo do_shortcode('[svg icon="instagram-fa"]'); ?></a>
</div>
</div>