HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/MvAlphen/va-bo.nl/wwwroot/wp-content/plugins/hattan-plugin/modules/VC_TimeLine.php
<?php

if (!class_exists('VC_TimeLine')) {

    class VC_TimeLine {

        private $shortcode_name = 'studiothemes_timeline';
        function __construct() {
            add_action('admin_init', array($this, 'studiothemes_shortcode_init'));
            add_shortcode( $this->shortcode_name, array( $this, 'studiothemes_shortcode' ) );
        }

        function studiothemes_shortcode_init() {
            if (function_exists('vc_map')) {
                $icons = getIconArray();
                vc_map(array(
                    "name" => "TimeLine",
                    "base" => $this->shortcode_name,
                    "category" => 'by Studio Themes',
                    "icon" => "",
                    "params" => array(
                        array(
                            "type" => "exploded_textarea",
                            "holder" => "",
                            "class" => "",
                            "heading" => __("Values", 'hattan-plugin'),
                            "param_name" => "values",
                            "value" => "21 AUGUST 2014|Completed project Yours Html,11 APRIL 2014|Template release Dasko wordpress,19 MARCH 2014|Andon project completed",
                            "description" => "Enter values for graph - data|content. Divide value sets with linebreak \"Enter\" (Example: 21 AUGUST 2014|Completed project Yours Html)."
                        ),
                    )
                )
            );}
        }

        function studiothemes_shortcode($atts, $content = null) {
            $output = $values = $values_array = $data = $i = '';

            $args = array(
                'values'=>''
            );
            extract(shortcode_atts($args, $atts));


            $output .= '<section class="cd-timeline">';
            $values_array = explode( ",", $values );
            $i = 1;
            foreach ($values_array as $value) {
            $data = explode("|", $value);
            $output .="<div class=\"cd-timeline-block\"><div class=\"cd-timeline-img\"></div>";
            if($i%2 == 1){
                $output .= "<div class=\"cd-timeline-content\" data-animate=\"fadeInRight\">";
            }else{
                $output .= "<div class=\"cd-timeline-content\" data-animate=\"fadeInLeft\">";
            }
                $output .="<p><strong>{$data[0]}</strong>$data[1]</p></div></div>";
                $i++;
            }
            $output .= '</section>';

            return $output;
        }

    }

    // Finally initialize code
    new VC_TimeLine();
}