HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/shaping-sar.ru/public_html/wp-content/themes/beauty spa/builder/shortcode/spa_carousel.php
<?php 

class iz_shortcode_carousel extends iz_shortcode
{
	public function __construct()
	{
		$this->custom_shortcode('iz_carousel', array($this, 'iz_render_html'));
		add_action('vc_before_init', array($this, 'iz_vc_shortcode'));
	}
	public function iz_vc_shortcode()
	{
		vc_map( array(
		    "name"      => __( "Spa Slider Carousel", IZ_LANG),
		    "base"      => "iz_carousel",
		    "as_parent" => array('only' => 'iz_service'),
		    "content_element" => true,
		    "wrapper_class" => "",
		    "show_settings_on_create" => false,
		    "category"  => __( "Spa Shortcode", IZ_LANG),		    
		    // 'admin_enqueue_js' => array(get_template_directory_uri().'/vc_extend/button.js'),
		    //'admin_enqueue_css' => array(get_template_directory_uri().'/vc_extend/bartag.css'),
		    "params" => array(
		        array(
			        'type' => 'dropdown',
			        'heading' => __( 'Slider interval', IZ_LANG ),
			        'param_name' => 'interval',
			        'value' => array(
			        __( '1s', IZ_LANG ) => 1000,
			        __( '2s', IZ_LANG ) => 2000,
			        __( '3s', IZ_LANG ) => 3000,
			        __( '4s', IZ_LANG ) => 4000,
			        __( '5s', IZ_LANG ) => 5000,
			        __( '6s', IZ_LANG ) => 6000,
			        __( '7s', IZ_LANG ) => 7000,
			        __( '8s', IZ_LANG ) => 8000,
			        __( '9s', IZ_LANG ) => 9000,
			        __( '10s', IZ_LANG ) => 10000,
			        ),			        
		        ),		        
		    ),
			"js_view" => 'VcColumnView'
		));		
	}

	public function iz_render_html($atts, $content = '')
	{
		extract( shortcode_atts( array(
	        'interval'         => '',      	        
   		), $atts ) );
   		$html = '<div id="serviceList" class="carousel slide clearfix" data-ride="carousel" data-interval="'.esc_attr($interval).'">';
   		$titles = apply_filters('iz_get_slider_title', $content);
   		$html .= '<ol class="carousel-indicators clearfix">';
   		$i = 0;
   		foreach ($titles as $title) {
   			$active = ($title['active'] == 'true') ? 'active' : '';
   			$html .= '<li data-target="#serviceList" data-slide-to="'.$i.'" class="item'.($i + 1).' '.$active.' wow fadeInDown" data-wow-offset="200" data-wow-delay="100ms">';
            $i++;              
            $html .= '<strong>'.$title['title'].'</strong>';
            $html .= '<span>'.$i.'</span></li>';
   		}
   		$html .= '</ol>';
   		$html .= '<div class="carousel-inner">';
   		$html .= wpb_js_remove_wpautop($content);
   		$html .= '</div>';
   		$html .= '</div>';
	   	return $html;
	}
}
if ( class_exists( 'WPBakeryShortCodesContainer' ) ) {
    class WPBakeryShortCode_Iz_Carousel extends WPBakeryShortCodesContainer {
    }
}