<?php
/*
    VC basic extensions
    integrated in core theme
*/
namespace vc;

if( ! defined( 'ABSPATH' ) ) exit;

new composer;
class composer {

    /*
        General constructor
    */
    public function __construct() {
        
        // exit if vc is not installed  
        if (!helper::is_active_plugin('js_composer/js_composer.php')) return;    

        add_action( 'vc_before_init', array($this, 'multimedia_vc') );
        // empty space
        add_action( 'vc_before_init', array($this, 'blank_space_vc') );
        // headlines
        add_action( 'vc_before_init', array($this, 'headlines_vc') );
        // buttons
        add_action( 'vc_before_init', array($this, 'cbutton_vc') );
        add_action( 'vc_before_init', array($this, 'cbutton_anchor_vc') );
        // icons
        add_action( 'vc_before_init', array($this, 'icons_vc') );
        // social media
        add_action( 'vc_before_init', array($this, 'smshare_vc') );
        add_action( 'vc_before_init', array($this, 'smchannels_vc') );
        // post
		add_action( 'vc_before_init', array($this, 'posts_links_vc') );
		add_action( 'vc_before_init', array($this, 'posts_overview_vc') );
        add_action( 'vc_before_init', array($this, 'posts_template_vc') );
        add_action( 'vc_before_init', array($this, 'posts_details_vc') );
        add_action( 'vc_before_init', array($this, 'post_template_vc') );
        // search
        add_action( 'vc_before_init', array($this, 'search_vc') );
        // extra navigation
        add_action( 'vc_before_init', array($this, 'extranav_vc') );
        add_action( 'vc_before_init', array($this, 'dropdownnav_vc') );
        // copyright
        add_action( 'vc_before_init', array($this, 'copyright_vc') );
        // content_box
        add_action( 'vc_before_init', array($this, 'content_box_vc') );
        // styles lists
        add_action( 'vc_before_init', array($this, 'list_vc') );
        // conditional content
        add_action( 'vc_before_init', array($this, 'cond_content_vc') );
        // counter
        add_action( 'vc_before_init', array($this, 'counter_vc') );        

        add_action( 'admin_init', array($this, 'mod_defaults_vc'), 100);
    }

    /*
        render vc modules
    */
    /* multimedia embed */
    public function multimedia_vc() {
        // embed
        vc_map(array(
            "name"          => __('Inhalte einbetten', 'core'),
            "description"   => __('Einbinden von Multimedia-Inhalten', 'core'),
            "base"          => "vc_multimedia",
            "category"      => __('Inhalt', 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/iframe.svg",
			"params"        => array(
                array(
                    "type"          => "seperator",
                    "heading"       => __('Inhalt einbetten', 'core'),
                    "param_name"    => "seperator_basic",
                ),
                // choose source
                array(
                    "type"          => "dropdown",
                    "heading"       => __("Quelle", 'core'),
                    //"description"   => __('', 'core'),
                    "param_name"    => "src",
                    'admin_label'   => true,
                    "value" => array(
                        __('bitte auswählen', 'core') => '',
                        __("iFrame", 'core') => 'iframe',
                        __("Animoto (Video)", 'core') => 'animoto',
                        __("Blip (Video)", 'core') => 'blip',
                        __("Cloudup (Video, Galerie, Bild)", 'core') => 'cloudup',
                        __("CollegeHumor (Video)", 'core') => 'collegehumor',
                        __("DailyMotion (Video)", 'core') => 'dailymotion',
                        __("Facebook (Post, Aktivität, Foto, Video, Medien, Frage, Notiz)", 'core') => 'facebook',
                        __("Flickr (Video)", 'core') => 'flickr',
                        __("FunnyOrDie.com (Video)", 'core') => 'funnyordie',
                        __("Hulu (Video)", 'core') => 'hulu',
                        __("Imgur (Bild)", 'core') => 'imgur',
                        __("Instagram (Bild)", 'core') => 'instagram',
                        __("Issuu (Dokument)", 'core') => 'issuu',
                        __("Kickstarter (Projekt)", 'core') => 'kickstarter',
                        __("Meetup.com", 'core') => 'meetup',
                        __("Mixcloud (Musik)", 'core') => 'mixcloud',
                        __("Photobucket (Bild)", 'core') => 'photobucket',
                        __("PollDaddy (Umfrage)", 'core') => 'polldaddy',
                        __("Reddit (Post, Kommentar)", 'core') => 'reddit',
                        __("ReverbNation (Musik)", 'core') => 'reverbnation',
                        __("Scribd (Dokument)", 'core') => 'scribd',
                        __("SlideShare (Präsentation, Slideshow)", 'core') => 'slideshare',
                        __("SmugMug (Diverses)", 'core') => 'smugmug',
                        __("SoundCloud (Musik)", 'core') => 'soundcloud',
                        __("Speaker Deck (Präsentation, Slideshow)", 'core') => 'speakerdeck',
                        __("Spotify (Musik)", 'core') => 'spotify',
                        __("TED (Video)", 'core') => 'ted',
                        __("Tumblr (Diverses)", 'core') => 'tumblr',
                        __("Twitter (Tweet, Profil, Liste, Sammlung, Likes, Momente)", 'core') => 'twitter',
                        __("VideoPress (Video)", 'core') => 'videopress',
                        __("Vimeo (Video)", 'core') => 'vimeo',
                        __("Vine (Video)", 'core') => 'vine',
                        __("WordPress plugin directory (Plugin)", 'core') => 'wordwress',
                        __("WordPress.tv (Video)", 'core') => 'wordpresstv',
                        __("YouTube (Video)", 'core') => 'youtube',
                    )
                ),
                // dynamic source
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_url',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'textfield',
                        'field' => 'url',
                    ),
                    'dependency'  => array(
                        'element' => 'src',
                        'not_empty' => true
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                ),
                // source
                array(
                    "type"          => "textfield",
                    "heading"       => __('URL', 'core'),
                    //"description"   => __('', 'core'),
                    "param_name"    => "url",
                    'admin_label'   =>  true,
                    'dependency'  => array(
                        'element' => 'src',
                        'not_empty' => true
                    ),
                ),

                // iFrame
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Breite', 'core'),
                    'description' => __('in px oder %', 'core'),
                    'param_name'  => 'iframe_width',
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-4',
                    'dependency'  => array(
                        'element' => 'src',
                        'value' => 'iframe',
                    ),
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Höhe', 'core'),
                    'description' => __('in px oder %', 'core'),
                    'param_name'  => 'iframe_height',
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-4',
                    'dependency'  => array(
                        'element' => 'src',
                        'value' => 'iframe',
                    ),
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Rahmen', 'core'),
                    'description' => __('Soll der iFrame umrahmt werden?', 'core'),
                    'param_name'  => 'iframe_frameborder',
                    'admin_label' => false,
                    'edit_field_class' => 'vc_col-xs-4',
                    'dependency'  => array(
                        'element' => 'src',
                        'value' => 'iframe',
                    ),
                ),
                // Position
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "pull",
                    'admin_label'   =>  true,
                    'edit_field_class' => 'vc_col-xs-4',
                    "value"         => array(
                        _x('linksbündig', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => '_center',
                        _x('rechtsbündig', 'small', 'core') => "_right",
                    ),
                    'dependency'  => array(
                        'element' => 'src',
                        'not_empty' => true
                    ),
                ),

            )
        ));
    }
    /* dynamic empty space */
    public function blank_space_vc() {
        vc_map( array(
            "name"          => __('Leerer Bereich', 'core'),
            "description"   => __('Leerer Bereich mit dynamischer Höhe', 'core'),
            "base"          => "vc_blank_space",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/empty.svg",
            "params"        => array(
                // dynamic height
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_height',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'textfield',
                        'field' => 'height',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Basishöhe', 'core'),
                    "description"   => __('in px oder em', 'core'),
                    // "description"   => __('Die Basishöhe wird je Breakpoint durch die unteren Werte skaliert. (Einheit: in px oder em)', 'core'),
                    'param_name'    => 'height',
                    // 'edit_field_class' => 'vc_col-xs-3',
                    'admin_label'   => true,
                    'value'         => '50px',
                ),
                array(
                    "type"        => 'seperator',
                    'heading'       => __('Skalierung', 'core'),
                    "param_name"  => 'seperator_basis',
                ),     
                array(
                    'type'          => 'textfield',
                    'heading'       => __('auf Mobilgeräten', 'core').'<br/><u>('.__('bis 480px', 'core').')</u>',
                    'description'   => __('in % oder em', 'core'),
                    'param_name'    => 'height_sm',
                    'edit_field_class' => 'vc_col-xs-3',
                    'admin_label'   => true,
                    'value'         => '25%',
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('auf kleinen Tablets', 'core').'<br/><u>('.__('481 bis 767px', 'core').')</u>',
                    'description'   => __('in % oder em', 'core'),
                    'param_name'    => 'height_md',
                    'edit_field_class' => 'vc_col-xs-3',
                    'admin_label'   => true,
                    'value'         => '50%',
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('auf Tablets', 'core').'<br/><u>('.__('768 bis 1024px', 'core').')</u>',
                    'description'   => __('in % oder em', 'core'),
                    'param_name'    => 'height_lg',
                    'edit_field_class' => 'vc_col-xs-3',
                    'admin_label'   => true,
                    'value'         => '75%',
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('auf Desktop-Geräten', 'core').'<br/><u>('.__('ab 1025px', 'core').')</u>',
                    'description'   => __('in % oder em', 'core'),
                    'param_name'    => 'height_xl',
                    'edit_field_class' => 'vc_col-xs-3',
                    'admin_label'   => true,
                    'value'         => '100%',
                ),
                array(
                    "type"    => "info_text",
                    "text"    => __("Die Basishöhe wird je Breakpoint durch diese Werte skaliert.", 'core'),
                    "styling" => "info", 
                    "param_name" => 'info_height',
                ), 
                array(
                    'type' => 'css_editor',
                    'heading' => __( 'CSS Box', 'core' ),
                    'param_name' => 'css',
                    'group' => __( 'Designeinstellungen', 'core' ),
                ),
            )
        ) );
    }
    /* headlines */
    public function headlines_vc() {
        vc_map( array(
            "name"          => __('Überschrift', 'core'),
            "description"   => __('Überschriftselement für H1–H6', 'core'),
            "base"          => "vc_headlines",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/headline.svg",
            "params"        => array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __("Allgemein", 'core'),
                    "param_name"  => 'seperator_headline',
                ),
                
                // dynamic headline text
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_title',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'textarea',
                        'field' => 'title',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                ),
                // headline text
                array(
                    "type"          => "textarea",
                    "heading"       => __('Überschrift', 'core'),
                    "description"   => __('Wie soll die Überschrift lauten?', 'core'),
                    "param_name"    => "title",
                    'admin_label'   => true
                ),

                array(
                    "type"        => 'seperator',
                    "heading"     => __("Gestaltung", 'core'),
                    "param_name"  => 'seperator_layout',
                ),
                // set h1 - h6
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Darstellung', 'core'),
                    "param_name"    => "h",
                    'admin_label'   => true,
                    "value" => array(),
                    'edit_field_class' => 'vc_col-xs-3',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('H-Tag', 'core'),
                    "param_name"    => "h_tag",
                    'admin_label'   => true,
                    "value" => helper::get_vc_headline_params(),
                    'edit_field_class' => 'vc_col-xs-3',
                ),
                // dynamic h tag
                array(
                    'type'          => 'dynamic',
                    "heading"       => __('H-Tag dynamisch?', 'core'),
                    'param_name'    => 'dynamic_h_tag',
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'dropdown_h',
                        'field' => 'h_tag',
                    ),
                    'edit_field_class' => 'vc_col-xs-3',
                ),
                // alignment
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "align",
                    'admin_label'   => true,
                    "value"         => array(
                        _x('linksbündig', 'small', 'core')  => '',
                        _x('zentriert', 'small', 'core') => '_center',
                        _x('rechtsbündig', 'small', 'core') => '_right',
                    ),
                    'edit_field_class' => 'vc_col-xs-3',
                ),
                // Versal
                array(
                    'type'          => 'checkbox',
                    'heading'       => __('Versal', 'core'),
                    'description'   => __('Überschrift in Großbuchstaben anzeigen.', 'core'),
                    'param_name'    => 'versal',
                    'admin_label'   => true,
                    'edit_field_class' => 'vc_col-xs-3',
                ),

                array(
                    "type"        => 'seperator',
                    "heading"     => __("Erweitert", 'core'),
                    "param_name"  => 'seperator_more',
                ),
                // Text-Color
                array(
                    "type"          => "colorselect",
                    "heading"       => __('Schriftfarbe', 'core'),
                    "param_name"    => "color",
                    'edit_field_class' => 'vc_col-xs-12',
                    'admin_label'   => true,
                ),
                // maxwidth
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Maximale Breite', 'core'),
                    'description'   => __('in px, % oder em', 'core'),
                    'param_name'    => 'max_width',
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                // Font Size
                array(
                    "type"          => "textfield",
                    "heading"       => __('Schriftgröße', 'core'),
                    "description"   => __('in px oder em', 'core'),
                    "param_name"    => "font_size",
                    'admin_label'   => true,
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                // Font Weight
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Schriftschnitt', 'core'),
                    // "description"   => __('Wählen Sie den Schriftschnitt', 'core'),
                    "param_name"    => "font_weight",
                    'admin_label'   => true,
                    "value"		  	=> array(
                        _x('Standard', 'small', 'core') => '',
                        __('100 - extra thin', 'core') => '100',
                        __('200 - thin', 'core') => '200',
                        __('300 - light', 'core') => '300',
                        __('400 - regular', 'core') => '400',
                        __('500 - medium', 'core') => '500',
                        __('600 - semi-bold', 'core') => '600',
                        __('700 - bold', 'core') => '700',
                        __('800 - extra bold', 'core') => '800',
                        __('900 - fat', 'core') => '900',
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                // css
                array(
                    'type' => 'css_editor',
                    'heading' => __( 'CSS', 'core' ),
                    'param_name' => 'css',
                    'group' => __( 'Designeinstellungen', 'core' ),
                ),
            )
        ));  
        // vc_lean_map( 'vc_headlines', array( 'vcInfoBox', 'map' ) );      
    }
    /* buttons */
    public function cbutton_vc() {
        vc_map(array(
            "name"          => __('Button', 'core'),
            "base"          => "vc_cbutton",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/button.svg",
            "description"   => __('Verschiedene Darstellungsvarianten für Buttons & Links', 'core'),
            "params"        => array_merge(array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Allgemein', 'core'),
                    "param_name"  => 'seperator_main',
                ),
                // modus
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Art des Buttons', 'core'),
                    // "description"   => __('Hier können Sie die Art des Buttons auswählen', 'core'),
                    "param_name"    => "style",
                    'admin_label'   =>  true,
                    "value"         => array(
                        // _x('bitte auswählen', 'small', 'core') => '',
                        _x('Link Button', 'small', 'core') => 'normal',
                        _x('Download Button', 'small', 'core') => 'download',
                        _x('Email Button', 'small', 'core') => "email",
                        _x('Zurück Button', 'small', 'core') => "back",
                        _x('Scroll-To Button', 'small', 'core') => "down",
                        _x('Content Wrapper Button', 'small', 'core') => "cwb",
                        // _x('Pop-up schließen', 'small', 'core') => "popup_close",
                        // _x('Pop-up öffnen', 'small', 'core') => "popup_open",
                        _x('Trigger Button', 'small', 'core') => "greyd_trigger",
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                array(
                    "type"          => "info_text",
                    "text"          => __("Die Content Wrapper Funktion ermöglicht das Verstecken einer Zeile hinter einem Button. Wird dieser angeklickt, erscheint die versteckte Zeile anstelle des Buttons. Lege dazu einen Content Wrapper Button in die Content Wrapper Zeile und setze darunter die Zeile, die mit Klick auf den Button sichtbar werden soll.", 'core'),
                    "styling"       => "info", 
                    "param_name"    => 'info_cwb',
                    'dependency'    => array(
                        'element'   => 'style',
                        'value'     => 'cwb',
                    ),
                ),
                array(
                    "type"        => 'new_line',
                    "param_name"  => 'new_line_button_type',
                ),
                // dynamic text
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_content',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'textarea',
                        'field' => 'content',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => array('download','email','back','down','popup_close','popup_open','greyd_trigger')
                    ),
                ),
                // Text for dl, email, back
                array(
                    "type"          => "textarea",
                    "heading"       => __('Text auf dem Button', 'core'),
                    //"description"   => __('Welcher Text soll auf dem Button stehen?', 'core'),
                    "param_name"    => "content",
                    'admin_label'   =>  true,
                    'edit_field_class' => 'vc_col-xs-8',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => array('download','email','back','down','popup_close','popup_open','greyd_trigger')
                    ),
                ),
                // dynamic link
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_linkk',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'vc_link',
                        'field' => 'linkk',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'normal',
                    ),
                ),
                // link selection for normal
                array(
                    "type"          => "vc_link",
                    "heading"       => __('Link', 'core'),
                    "description"   => __('Wohin soll der Button verlinken?', 'core'),
                    "param_name"    => "linkk",
                    //'holder'        => 'div',
                    'admin_label'   =>  true,
                    'edit_field_class' => 'vc_col-xs-8',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'normal',
                    ),
                ),
                // Versal
                array(
                    'type'          => 'checkbox',
                    'heading'       => __('Versal', 'core'),
                    'description'   => __('Buttontext in Großbuchstaben anzeigen.', 'core'),
                    'param_name'    => 'versal',
                    'admin_label'   => true,
                    'edit_field_class' => 'vc_col-xs-4',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => array('normal', 'download','email','back','down','popup_close','popup_open','greyd_trigger')
                    ),
                ),
                // dynamic file
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_file',
                    'heading'       => __( 'Datei', 'core' ),
                    // 'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'file_picker_file',
                        'field' => 'file',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'download',
                    ),
                ),
                // file selection for download
                array(
                    'type'          => 'file_picker',
                    'heading'       => __('Datei', 'core'),
                    "description"   => __( 'Welche Datei soll zum Download bereitgestellt werden?', 'core' ),
                    'param_name'    => 'file',
                    'admin_label'   => true,
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'download',
                    ),
                ),
                // dynamic email
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_email',
                    'heading'       => __( 'Emailtyp', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'emailfield',
                        'field' => 'email',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'email',
                    ),
                ),
                // email options
                array(
                    "type"          => "textfield",
                    "heading"       => __('Adresse', 'core'),
                    "description"   => __('An welche Adresse soll die E-Mail versendet werden?', 'core'),
                    "param_name"    => "email",
                    'admin_label'   =>  true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'email',
                    ),
                ),
                array(
                    "type"          => "textfield",
                    "heading"       => __('Betreff', 'core'),
                    "description"   => __('Welcher Betreff soll in der E-Mail angezeigt werden?', 'core'),
                    "param_name"    => "subject",
                    'admin_label'   =>  true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'email',
                    ),
                ),
                // dynamic anchor select
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_anchor',
                    'heading'       => __( 'Anker', 'core' ),
                    // 'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'dropdown_anchor',
                        'field' => 'anchor',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'down',
                    ),
                ),
                // scroll down anchor select
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ankerziel', 'core'),
                    "description"   => __('Zu welcher Sprungmarke soll der Nutzer gelangen?', 'core'),
                    "param_name"    => "anchor",
                    "value"         => helper::get_vc_cbutton_anchor_params(),
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'down',
                    ),
                ),
                // popups
                array(
                    "type"          => "select",
                    "heading"       => __('Pop-up', 'core'),
                    "param_name"    => "popup",
                    "options"         => helper::get_vc_posts('greyd_popup', true),
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => 'style',
                        'value' => 'popup_open',
                    ),
                ),
            ),
            $this->trigger_options_vc("", array(
                'element' => 'style',
                'value' => 'greyd_trigger',
            )),
            $this->cbutton_params_vc()
            )
        ));
    }
	public function cbutton_params_vc() {
		return array_merge(array(
            // Designeinstellungen for all
            array(
                'type' => 'css_editor',
                'heading' => __( 'CSS Box', 'core' ),
                'param_name' => 'css',
                'group' => __( 'Designeinstellungen', 'core' ),
            ),
        ),

        array(
            array(
                "type"        => 'seperator',
                "heading"     => __('Design', 'core'),
                "param_name"  => 'seperator_layout',
                'dependency'  => array(
                    'element'   => 'style',
                    'not_empty' => true
                ),
            ),

            // additional options
            // alignment
            array(
                "type"          => "dropdown",
                "heading"       => __('Ausrichtung', 'core'),
                // "description"   => __('Hier können Sie die Ausrichtung des Buttons auswählen', 'core'),
                "param_name"    => "pull",
                'admin_label'   =>  true,
                'edit_field_class' => 'vc_col-xs-4',
                "value"         => array(
                    _x('linksbündig', 'small', 'core') => '',
                    _x('zentriert', 'small', 'core') => '_center',
                    _x('rechtsbündig', 'small', 'core') => "_right",
                ),
				'dependency'  => array(
					'element' => 'mode',
                    'value' => array('','_sec','_button','_button _sec','_button _trd','custom2')
				),
            ),
            // width
            array(
                'type'          => 'textfield',
                'heading'       => __('Breite', 'core'),
                'description'   => __('in px oder %', 'core'),
                'param_name'    => 'min_width',
                'admin_label'   =>  true,
                'edit_field_class' => 'vc_col-xs-4',
				'dependency'  => array(
					'element' => 'mode',
                    'value' => array('_button','_button _sec','_button _trd','custom2')
				),
            ),
            // Größe
            array(
                "type"          => "dropdown",
                "heading"       => __('Größe', 'core'),
                "description"   => __('Wie groß soll der Button sein?', 'core'),
                "param_name"    => "size",
                'admin_label'   =>  true,
                'edit_field_class' => 'vc_col-xs-4',
                "value"         => array(
                    _x('normal', 'small', 'core') => '',
                    _x('groß', 'small', 'core') => '_big',
                    _x('klein', 'small', 'core') => '_small',
                ),
				'dependency'  => array(
					'element' => 'mode',
                    'value' => array('_button','_button _sec','_button _trd','custom2')
				),
            ),

            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_button_mode',
                'dependency'  => array(
                    'element'   => 'style',
                    'not_empty' => true
                ),
            ),
            // mode
            array(
                "type"          => "dropdown",
                "heading"       => __('Darstellung', 'core'),
                "description"   => __('Wie soll der Button aussehen?', 'core'),
                "param_name"    => "mode",
                'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                'admin_label'   =>  true,
                "value"         => array(
                    _x('primärer Link', 'small', 'core') => '',
                    _x('sekundärer Link', 'small', 'core') => '_sec',
                    _x('primärer Button', 'small', 'core') => '_button',
                    _x('sekundärer Button', 'small', 'core') => "_button _sec",
                    _x('alternativer Button', 'small', 'core') => "_button _trd",
                    _x('individuell überschreiben', 'small', 'core') => "custom2",
                ),
                'dependency'  => array(
                    'element'   => 'style',
                    'not_empty' => true
                ),
            ),
            
        ),
        // custom button
        helper::custom_element_params_vc('btn', 'mode', 'custom2'),
        // Icon
        helper::custom_icon_params_vc('', 'style', array('normal','download','email','back','down','cwb','popup_close','popup_open','greyd_trigger'))

        );
    }
    public function cbutton_anchor_vc() {
        vc_map(array(
            "name"          => __('Anker Ziel', 'core'),
            "base"          => "vc_cbutton_anchor",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/anchor.svg",
            "description"   => __('Definition von Sprungmarken', 'core'),
            "params"        => array(
                array(
                    "type"          => "textfield",
                    "heading"       => __('Anker Bezeichnung', 'core'),
                    "description"   => __('Wie soll die Sprungmarke heißen? (Hinweis: bitte keine Leerzeichen oder Sonderzeichen verwenden)', 'core'),
                    "param_name"    => "anchor",
                    'admin_label'   =>  true
                )
            )
        ));
    }
    public function trigger_options_vc($pre="", $dependency=[]) {
        return array(
            array(
                "type"        => 'new_line',
                "param_name"  => $pre.'new_line_greyd_trigger',
            ),
            array(
                "type"          => "dropdown",
                "heading"       => __("Trigger Namen", "core"),
                "param_name"    => $pre."trigger_name",
                "value"         => helper::get_vc_trigger_events(),
                "edit_field_class" => "vc_col-xs-6",
                "dependency"    => $dependency,
            ),
            array(
                "type"          => "textfield",
                "heading"       => __("Trigger eingeben", "core"),
                "param_name"    => $pre."custom_trigger_name",
                "edit_field_class" => "vc_col-xs-6",
                "dependency"    => array(
                    "element"   => $pre."trigger_name",
                    "value"     => "__custom",
                ),
            ),
            array(
                "type"          => "checkbox",
                "heading"       => __("Trigger Auslöser", "core"),
                "value"         => array(
                    __("Trigger on Hover auslösen", "core") => "true",
                    __("Trigger überall auslösen", "core") => "global",
                ),
                "description"   => __("Aktiviere diese Funktion, wenn du denselben Trigger Namen mehrmals auf deiner Seite verwendest und beim Auslösen alle Events getriggert werden sollen.", "core"),
                "param_name"    => $pre."trigger_hover",
                // "edit_field_class" => "vc_col-xs-6",
                "dependency"    => $dependency,
            ),
            array(
                "type"          => "info_text",
                "text"          => __("Du kannst individuelle Trigger für Templates und Content Boxen einstellen. Bearbeite jeweils das Modul und klicke auf den Tab „Trigger Aktionen“.", "core"),
                "styling"       => "info",
                "param_name"    => $pre."trigger_info",
                "edit_field_class" => "vc_col-xs-6",
                "dependency"    => $dependency,
            ),
        );
    }

    /* icons */
    public function icons_vc() {
        global $config;
        $lottie = $config->settings['site']['lottie']['mode'];
        vc_map(array(
            "name"        => __('Bild','core'),
            "description" => __('Grafisches Element (z.B. Foto, Grafik, Icon, json-Animation)','core'),
            "base"        => "vc_icons",
            "category"    => __("Inhalt", 'core'),
            "icon"        => get_template_directory_uri()."/assets/icon/icons.svg",
            "params"      => array_merge(array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __("Inhalt", 'core'),
                    "param_name"  => 'seperator_headline',
                ),
                
                // dynamic image
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_icon',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => ($lottie !== 'disable') ? 'file_picker' : 'file_picker_image',
                        'field' => 'icon',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                ),
                // image/animation
                array(
                    'type' => 'file_picker',
                    'heading' => __( 'Bild', 'core' ),
                    'param_name' => 'icon',
                    'filetype'      => ($lottie !== 'disable') ? array('json','image') : array('image'),
                    'admin_label' => true,
                ),

                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    // "description"   => __('Hier können Sie angeben, wie das Bild positioniert werden soll', 'core'),
                    "param_name"    => "pull",
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label'   =>  true,
                    "value"         => array(
                        _x('linksbündig', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => '_center',
                        _x('rechtsbündig', 'small', 'core') => "_right",
                    ),
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Breite', 'core'),
                    'description'   => __('in px oder %', 'core'),
                    'param_name'    => 'width',
                    'edit_field_class' => 'vc_col-xs-4',
                ),
            ),
            ($lottie !== 'disable') ? array(
                array(
                    "type"        => 'seperator',
                    'heading'       => __('Animation', 'core'),
                    'description' => __('Nur für <a href="https://airbnb.io/lottie/#/">Lottie/bodymovin Animationen</a> im json Format verfügbar.','core'),
                    "param_name"  => 'seperator_animations',
                ),
                // dynamic placeholder
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_placeholder',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'file_picker_image',
                        'field' => 'placeholder',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                ),
                // placeholder
                array(
                    'type' => 'file_picker',
                    'heading' => __( 'Platzhalter', 'core' ),
                    'param_name' => 'placeholder',
                    'filetype'      => array('image'),
                ),
                // json anim
                array(
                    'type' => 'dropdown',
                    'heading' => __('SVG Animation', 'core'),
                    'param_name' => 'anim',
                    'admin_label' => true,
                    'value' => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('automatisch starten', 'small', 'core') => 'auto',
                        _x('bei Hover starten', 'small', 'core') => 'hover',
                        _x('starten sobald sichtbar', 'small', 'core') => 'visible',
                    ),
                    // 'dependency' => [
                    // 	'element' => 'icon',
                    // 	'not_empty' => true
                    // ],
                    'edit_field_class' => 'vc_col-xs-6',
                ),
                array(
                    "type"        => 'new_line',
                    "param_name"  => 'new_line_animations',
                ),
            ) : array(),
            array(
                array(
                    "type"        => 'seperator',
                    'heading'       => __('Verlinkung', 'core'),
                    "param_name"  => 'seperator_link_image',
                ),
                // link selection
                array(
                    "type"          => "vc_link",
                    "heading"       => __('Link', 'core'),
                    "description"   => __('Soll das Bild verlinkt werden?', 'core'),
                    "param_name"    => "link",
                    'edit_field_class' => 'vc_col-xs-6',
                    'admin_label'   =>  true,
                ),
                // css
                array(
                    'type' => 'css_editor',
                    'heading' => __( 'CSS', 'core' ),
                    'param_name' => 'css',
                    'group' => __( 'Designeinstellungen', 'core' ),
                ),
            ))
        ));
    }
    /* social media */
    public function smshare_vc() {
        vc_map(array(
            "name"        => __('Seite teilen', 'core'),
            "description" => __('Icon-Buttons zum Teilen via Social Media', 'core'),
            "base"        => "vc_smshare",
            "category"    => __("Inhalt", 'core'),
            "icon"        => get_template_directory_uri()."/assets/icon/share.svg",
            "params"      => array(
                // Title Teilen
                array(
                    "type"		  => "seperator",
                    "heading"     => __('Diese Seite über Social Media teilen', 'core'),
                    "param_name"  => "seperator_share",
                ),
                // Position
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "description"   => __('Ausrichtung der Social Media Sharing Leiste', 'core'),
                    "param_name"    => "pull",
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label'   =>  true,
                    "value"         => array(
                        _x('linksbündig', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => '_center',
                        _x('rechtsbündig', 'small', 'core') => "_right",
                    ),
                ),
                // hover
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Hover-Effekt', 'core'),
                    //"description"   => __('Filter bei Berührung durch den Mauszeiger', 'core'),
                    "param_name"    => "filter",
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label'   =>  true,
                    "value"         => array(
                        _x('in Graustufen konvertieren', 'small', 'core') => 'grayscale',
                        _x('Sepia-Effekt', 'small', 'core') => 'sepia',
                        _x('saturieren', 'small', 'core') => "saturate",
                        _x('Farben invertieren', 'small', 'core') => 'invert',
                        _x('Deckkraft verändern', 'small', 'core') => 'opacity',
                        _x('Helligkeit verändern', 'small', 'core') => 'brightness',
                        _x('Kontrast verändern', 'small', 'core') => 'contrast',
                        _x('weichzeichnen', 'small', 'core') => 'blur',
                    ),
                ),
                // border-radius
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Eckenradius', 'core'),
                    'description'   => __('in px', 'core'),
                    'param_name'    => 'border_radius',
                    'edit_field_class' => 'vc_col-xs-2',
                    'admin_label'   =>  true,
                    'value'         => "0px",
                ),
                array(
                    "type"        => 'new_line',
                    "param_name"  => 'new_line_before_channels',
                ),
                // Title Kanäle
                array(
                    "type"		  => "sub_seperator",
                    "heading"     => __('Kanäle', 'core'),
                    "param_name"  => "sub_seperator_channels",
                ),
                // Plattforms
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Facebook",
                    "param_name"  => "facebook",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Twitter",
                    "param_name"  => "twitter",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Google+",
                    "param_name"  => "google",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    "type"		  => "checkbox",
                    "heading"     => "XING",
                    "param_name"  => "xing",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    "type"		  => "checkbox",
                    "heading"     => "LinkedIn",
                    "param_name"  => "linkedin",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Mail",
                    "param_name"  => "mail",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
  
            )
        ));
    }
    public function smchannels_vc() {
        vc_map(array(
            "name"        => __('Social Media', 'core'),
            "description" => __('Verlinkung auf Social-Media-Kanäle', 'core'),
            "base"        => "vc_smchannels",
            "category"    => __("Inhalt", 'core'),
            "icon"        => get_template_directory_uri()."/assets/icon/social.svg",
            "params"      => array(
                // Title Kanäle
                array(
                    "type"		  => "seperator",
                    "heading"     => __('Allgemein', 'core'),
                    "param_name"  => "title_general",
                ),
                // Position
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "pull",
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label'   =>  true,
                    "value"         => array(
                        _x('linksbündig', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => '_center',
                        _x('rechtsbündig', 'small', 'core') => "_right",
                    ),
                ),
                // hover
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Hover-Effekt', 'core'),
                    //"description"   => __('Filter bei Berührung durch den Mauszeiger', 'core'),
                    "param_name"    => "filter",
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label'   =>  true,
                    "value"         => array(
                        _x('in Graustufen konvertieren', 'small', 'core') => 'grayscale',
                        _x('Sepia-Effekt', 'small', 'core') => 'sepia',
                        _x('saturieren', 'small', 'core') => "saturate",
                        _x('Farben invertieren', 'small', 'core') => 'invert',
                        _x('Deckkraft verändern', 'small', 'core') => 'opacity',
                        _x('Helligkeit verändern', 'small', 'core') => 'brightness',
                        _x('Kontrast verändern', 'small', 'core') => 'contrast',
                        _x('weichzeichnen', 'small', 'core') => 'blur',
                    ),
                ),
                // border-radius
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Eckenradius', 'core'),
                    'description'   => __('in px', 'core'),
                    'param_name'    => 'border_radius',
                    'edit_field_class' => 'vc_col-xs-2',
                    'admin_label'   =>  true,
                    'value'         => "0px",
                ),
                // Title Kanäle
                array(
                    "type"		  => "seperator",
                    "heading"     => __('Kanäle', 'core'),
                    "param_name"  => "title_channels",
                ),
                // Plattforms
                // facebook
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Facebook",
                    "param_name"  => "facebook",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Facebook Page URL', 'core'),
                    'param_name'  => 'facebook_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // twitter
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Twitter",
                    "param_name"  => "twitter",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Twitter Page URL', 'core'),
                    'param_name'  => 'twitter_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // google
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Google+",
                    "param_name"  => "google",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Google+ Page URL', 'core'),
                    'param_name'  => 'google_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // soundcloud
                array(
                    "type"		  => "checkbox",
                    "heading"     => "SoundCloud",
                    "param_name"  => "soundcloud",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('SoundCloud Page URL', 'core'),
                    'param_name'  => 'soundcloud_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // youtube
                array(
                    "type"		  => "checkbox",
                    "heading"     => "YouTube",
                    "param_name"  => "youtube",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('YouTube Page URL', 'core'),
                    'param_name'  => 'youtube_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // xing
                array(
                    "type"		  => "checkbox",
                    "heading"     => "XING",
                    "param_name"  => "xing",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('XING Page URL', 'core'),
                    'param_name'  => 'xing_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // linkedin
                array(
                    "type"		  => "checkbox",
                    "heading"     => "LinkedIn",
                    "param_name"  => "linkedin",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('LinkedIn Page URL', 'core'),
                    'param_name'  => 'linkedin_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // instagram
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Instagram",
                    "param_name"  => "instagram",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Instagram Page URL', 'core'),
                    'param_name'  => 'instagram_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // snapchat
                array(
                    "type"		  => "checkbox",
                    "heading"     => "Snapchat",
                    "param_name"  => "snapchat",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Snapchat Page URL', 'core'),
                    'param_name'  => 'snapchat_url',
                    'edit_field_class' => 'vc_col-xs-10'
                ),
                // mail
                array(
                    "type"		  => "checkbox",
                    "heading"     => "E-Mail",
                    "param_name"  => "mail",
                    "class"       => "vc_sms_check",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-2'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('E-Mail Adresse', 'core'),
                    'param_name'  => 'mail_url',
                    'edit_field_class' => 'vc_col-xs-4'
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('E-Mail Betreff', 'core'),
                    'param_name'  => 'mail_txt',
                    'edit_field_class' => 'vc_col-xs-6'
                ),
  
            )
        ));

    }

    /* post */
    public function posts_links_vc() {
        vc_map(array(
            "name"          => __('Post Archiv', 'core'),
            "description"   => __('Sortierte Verlinkungen zu „archive“-Templates', 'core'),
            "base"          => "vc_posts_links",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/posts_archive.svg",
            "params"        => array_merge(
                array(
                    array(
                        "type"        => 'seperator',
                        "heading"     => __('Allgemein', 'core'),
                        "param_name"  => 'seperator_title',
                    ),
                    array(
                        "type"    => "info_text",
                        "text"    => __("Mit diesem Modul kannst du dem Nutzer ermöglichen, alle Beiträge nach Kriterien zu filtern.<br>Das Modul erzeugt Verlinkungen, die auf eine neue Seite verweisen, auf der die entsprechenden Beiträge dargestellt werden. Die Darstellung dieser Unterseite kontrollierst du mit dem Template „archive“.", 'core'),
                        "styling" => "info", 
                        "param_name" => 'info_general',
                    ),

                    // archive_type ( year | month | day | category | tag )
                    array(
                        'type' => 'dropdown',
                        'heading' => __('Archivtyp', 'core'),
                        'description' => __('Je nach Typ wird z.B. jedes Jahr angezeigt, für das mindestens ein Beitrag existiert.', 'core'),
                        'param_name' => 'archive_type',
                        'edit_field_class' => 'vc_col-xs-4',
                        'admin_label' => true,
                        'value' => array(
                            _x('nach Jahr', 'small', 'core') => 'yearly',
                            _x('nach Monat', 'small', 'core') => 'monthly',
                            // _x('Datum (Woche)', 'small', 'core') => 'weekly',
                            _x('nach Tag', 'small', 'core') => 'daily',
                            _x('nach Kategorie', 'small', 'core') => 'category',
                            _x('nach Schlagwort', 'small', 'core') => 'post_tag',
                        ),
                    ),

                    // archive post_type
                    array(
                        'type'        => 'select',
                        'heading'     => __('Post Type', 'core'),
                        'param_name'  => 'pt',
                        'edit_field_class' => 'vc_col-xs-4',
                        'options'     => array(),
                        'dependency'  => array(
                            'element'   => 'archive_type',
                            'value' => array( 'yearly', 'monthly', 'weekly', 'daily' )
                        ),
                    ),
                    array(
                        'type'        => 'select',
                        'heading'     => __('Post Type', 'core'),
                        'param_name'  => 'pt_by_cat',
                        'edit_field_class' => 'vc_col-xs-4',
                        'options'       => array(),
                        'dependency'  => array(
                            'element'   => 'archive_type',
                            'value' => array( 'category' )
                        ),
                    ),
                    array(
                        'type'        => 'select',
                        'heading'     => __('Post Type', 'core'),
                        'param_name'  => 'pt_by_tag',
                        'edit_field_class' => 'vc_col-xs-4',
                        'options'       => array(),
                        'dependency'  => array(
                            'element'   => 'archive_type',
                            'value' => array( 'post_tag' )
                        ),
                    ),

                    // mode ( list | dropdown | cloud )
                    array(
                        'type' => 'dropdown',
                        'heading' => __('Darstellung', 'core'),
                        'description' => __('Wie soll das Archiv dargestellt werden?', 'core'),
                        'param_name' => 'mode',
                        'edit_field_class' => 'vc_col-xs-4',
                        'admin_label' => true,
                        'value' => array(
                            _x('als Liste', 'small', 'core') => 'list',
                            _x('als Dropdown', 'small', 'core') => 'dropdown',
                            _x('als Wortwolke', 'small', 'core') => 'cloud',
                        ),
                        'dependency'  => array(
                            'element'   => 'archive_type',
                            'not_empty' => true
                        ),
                    ),

                    // options
                    array(
                        'type'        => 'checkbox',
                        'heading'     => __('Beitragsanzahl', 'core'),
                        'param_name'  => 'option_count',
                        'edit_field_class' => 'vc_col-xs-4',
                        'admin_label' => true,
                        'value' => array(
                            __('anzeigen', 'core') => 'count',
                        ),
                        'dependency'  => array(
                            'element'   => 'mode',
                            'not_empty' => true
                        ),
                    ),
                    array(
                        'type'        => 'checkbox',
                        'heading'     => __('Hierarchisch?', 'core'),
                        'param_name'  => 'option_hierarchical',
                        'edit_field_class' => 'vc_col-xs-4',
                        // 'admin_label' => true,
                        'value' => array(
                            __('anzeigen', 'core') => 'hierarchical',
                        ),
                        'dependency'  => array(
                            'element' => 'archive_type',
                            'value' => array('category')
                        ),
                    ),
                ),
                
                // Design
                array(
                    array(
                        "type"        => 'seperator',
                        "heading"     => __('Aussehen', 'core').' <u>'.__('der Elemente', 'core').'</u>',
                        "param_name"  => 'seperator_type',
                        'dependency'  => array(
                            'element' => 'mode',
                            'value' => array('list', 'cloud')
                        ),
                    ),
                    array(
                        "type"        => 'seperator',
                        "heading"     => __('Aussehen', 'core'),
                        "param_name"  => 'seperator_type2',
                        'dependency'  => array(
                            'element' => 'mode',
                            'value' => array('dropdown')
                        ),
                    ),
                    // mode > list
                    // button
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Darstellung', 'core'),
                        "param_name"    => "link_style",
                        'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                        "value" => array(
                            _x('primärer Link', 'small', 'core') => '',
                            _x('sekundärer Link', 'small', 'core') => '_link _sec',
                            _x('primärer Button', 'small', 'core') => '_button',
                            _x('sekundärer Button', 'small', 'core') => "_button _sec",
                            _x('alternativer Button', 'small', 'core') => "_button _trd",
                            _x('individuell überschreiben', 'small', 'core') => "custom",
                        ),
                        'dependency'  => array(
                            'element' => 'mode',
                            'value' => array('list')
                        ),
                    ),
                    
                    // mode > dropdown
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Darstellung', 'core'),
                        "param_name"    => "dropdown_style",
                        'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                        "value" => array(
                            _x('primäres Dropdown', 'small', 'core') => '_dropdown',
                            _x('sekundäres Dropdown', 'small', 'core') => "_dropdown _sec",
                            _x('individuell überschreiben', 'small', 'core') => "custom",
                        ),
                        'dependency'  => array(
                            'element' => 'mode',
                            'value' => array('dropdown')
                        ),
                    ),
                    
                    // mode > cloud
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Darstellung', 'core'),
                        "param_name"    => "cloud_style",
                        'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                        "value" => array(
                            _x('primärer Link', 'small', 'core') => '',
                            _x('sekundärer Link', 'small', 'core') => '_link _sec',
                            _x('individuell überschreiben', 'small', 'core') => "custom",
                        ),
                        'dependency'  => array(
                            'element' => 'mode',
                            'value' => array('cloud')
                        ),
                    ),
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Anordnung', 'core'),
                        "param_name"    => "content_layout",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value"         => array(
                            _x('nebeneinander', 'small', 'core') => 'inline',
                            _x('untereinander', 'small', 'core') => "stack",
                        ),
                        'dependency'  => array(
                            'element'   => 'mode',
                            'value' => array('cloud')
                        ),
                    ),
                    
                    // other
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Ausrichtung', 'core'),
                        "param_name"    => "content_pull",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value"         => array(
                            _x('linksbündig', 'small', 'core') => '',
                            _x('zentriert', 'small', 'core') => '_center',
                            _x('rechtsbündig', 'small', 'core') => "_right",
                        ),
                        'dependency'  => array(
                            'element'   => 'mode',
                            'not_empty' => true
                        ),
                    ),
                    
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Breite', 'core'),
                        'description'   => __('in px oder %', 'core'),
                        'param_name'    => 'content_width',
                        'edit_field_class' => 'vc_col-xs-4',
                        // 'value'         => '100%',
                        'dependency'  => array(
                            'element'   => 'mode',
                            'value' => array('list', 'dropdown')
                        ),
                    ),
                ),
                // custom button
                helper::custom_element_params_vc('link_', 'link_style', 'custom'),
                // Icon
                helper::custom_icon_params_vc('link_', 'mode', array('list')),
                // custom dropdown
                helper::custom_element_params_vc('dropdown_', 'dropdown_style', 'custom'),
                // custom link
                helper::custom_element_params_vc('cloud_', 'cloud_style', 'custom'),
                
                // more
                array(
                    array(
                        "type"        => 'seperator',
                        "heading"     => __('Erweitert', 'core'),
                        "param_name"  => 'seperator_more',
                    ),

                    // sorting
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Sortierung', 'core'),
                        "param_name"    => "content_sort",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value" => array(
                            _x('Name aufsteigend', 'small', 'core') => 'name ASC',
                            _x('Name absteigend', 'small', 'core') => 'name DESC',
                            _x('Anzahl aufsteigend', 'small', 'core') => 'count ASC',
                            _x('Anzahl absteigend', 'small', 'core') => 'count DESC',
                        ),
                        'dependency'  => array(
                            'element'   => 'archive_type',
                            'value' => array('category', 'post_tag')
                        ),
                    ),
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Sortierung', 'core'),
                        "param_name"    => "content_sort_date",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value" => array(
                            _x('Datum absteigend', 'small', 'core') => 'DESC',
                            _x('Datum aufsteigend', 'small', 'core') => 'ASC',
                        ),
                        'dependency'  => array(
                            'element'   => 'archive_type',
                            'value' => array('yearly', 'monthly', 'weekly', 'daily')
                        ),
                    ),

                    // dateformat
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Datumsformat', 'core'),
                        "param_name"    => "date_format_yearly",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value" => array(
                            _x('Standardformat', 'small', 'core') => '',
                            _x('JJJJ', 'small', 'core') => 'Y',
                            _x('JJ', 'small', 'core') => 'y',
                        ),
                        'dependency'  => array(
                            'element' => 'archive_type',
                            'value' => array('yearly')
                        ),
                    ),
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Datumsformat', 'core'),
                        "param_name"    => "date_format_monthly",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value" => array(
                            _x('Standardformat', 'small', 'core') => '',
                            _x('MM JJJJ', 'small', 'core') => 'm Y',
                            _x('MM JJ', 'small', 'core') => 'm y',
                            _x('MM', 'small', 'core') => 'm',
                            _x('Monat JJJJ', 'small', 'core') => 'F Y',
                            _x('Monat JJ', 'small', 'core') => 'F y',
                            _x('Monat', 'small', 'core') => 'F',
                        ),
                        'dependency'  => array(
                            'element' => 'archive_type',
                            'value' => array('monthly')
                        ),
                    ),
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Datumsformat', 'core'),
                        "param_name"    => "date_format_daily",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value" => array(
                            _x('Standardformat', 'small', 'core') => '',
                            _x('TT.MM.JJJJ', 'small', 'core') => 'd.m.Y',
                            _x('TT.MM.JJ', 'small', 'core') => 'd.m.y',
                            _x('TT.MM', 'small', 'core') => 'd.m',
                            _x('Tag TT.MM.JJJJ', 'small', 'core') => 'l d.m.Y',
                            _x('Tag TT.MM.JJ', 'small', 'core') => 'l d.m.y',
                            _x('Tag TT.MM.', 'small', 'core') => 'l d.m',
                            _x('T. Monat JJJJ', 'small', 'core') => 'j. F Y',
                            _x('T. Monat JJ', 'small', 'core') => 'j. F y',
                            _x('T. Monat', 'small', 'core') => 'j. F',
                            _x('Tag T. Monat JJJJ', 'small', 'core') => 'l j. F Y',
                            _x('Tag T. Monat JJ', 'small', 'core') => 'l j. F y',
                            _x('Tag T. Monat', 'small', 'core') => 'l j. F',
                            _x('Uhrzeit (h:i)', 'small', 'core') => 'G:i',
                            _x('Uhrzeit mit Sekunden (H:i:s)', 'small', 'core') => 'H:i:s',
                            _x('Stunden', 'small', 'core') => 'G',
                            _x('Minuten', 'small', 'core') => 'm',
                            _x('Sekunden', 'small', 'core') => 's',
                        ),
                        'dependency'  => array(
                            'element' => 'archive_type',
                            'value' => array('weekly', 'daily')
                        ),
                    ),
                    
                    // Headline
                    array(
                        "type"        => 'sub_seperator',
                        "heading"     => __('Überschrift darüber', 'core'),
                        "param_name"  => 'sub_seperator_title',
                    ),
                    // title
                    array(
                        'type'        => 'textarea',
                        'heading'     => __('Text der Überschrift', 'core'),
                        'param_name'  => 'title',
                        'admin_label' => true,
                    ),
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Ausrichtung', 'core'),
                        "param_name"    => "title_pull",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value"         => array(
                            _x('linksbündig', 'small', 'core') => '',
                            _x('zentriert', 'small', 'core') => '_center',
                            _x('rechtsbündig', 'small', 'core') => "_right",
                        ),
                    ),
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Überschriftseinheit', 'core'),
                        "param_name"    => "title_size",
                        'edit_field_class' => 'vc_col-xs-4',
                        "value" => array(
                            _x('keine Überschriftseinheit', 'small', 'core') => 'normal',
                            'H1' => 'h1',
                            'H2' => 'h2',
                            'H3' => 'h3',
                            'H4' => 'h4',
                            'H5' => 'h5',
                            'H6' => 'h6',
                            //_x('Bold', 'small', 'core') => 'strong',
                        ),
                    ),
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Schriftschnitt', 'core'),
                        // "description"   => __('Wählen Sie den Schriftschnitt', 'core'),
                        "param_name"    => "title_weight",
                        "value"		  	=> array(
                            _x('Standard', 'small', 'core') => '',
                            __('100 - extra thin', 'core') => '100',
                            __('300 - light', 'core') => '300',
                            __('400 - regular', 'core') => '400',
                            __('600 - semi-bold', 'core') => '600',
                            __('700 - bold', 'core') => '700',
                        ),
                        'edit_field_class' => 'vc_col-xs-4',
                    ),
                    array(
                        "type"          => "colorselect",
                        "heading"       => __('Schriftfarbe', 'core'),
                        "param_name"    => "title_color",
                        'edit_field_class' => 'vc_col-xs-6',
                    ),
                )
            )
		));
    }
    public function posts_overview_vc() {
        vc_map(array(
            "name"          => __('Post Übersicht', 'core'),
            "description"   => __('Posts als Slider, Raster o.Ä. darstellen', 'core'),
            "base"          => "vc_posts_overview",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/posts.svg",
            "params"        => array_merge(array(
                
				array(
					"type"        => 'seperator',
					"heading"     => __('Allgemein', 'core'),
					"param_name"  => 'seperator_choice',
                    "weight"        => 10,
                ),
                array(
                    'type' => 'dropdown',
                    'heading' => __('Beiträge', 'core'),
                    'description' => __('Welche Beiträge sollen dargestellt werden?', 'core'),
                    'param_name' => 'mode',
                    'edit_field_class' => 'vc_col-xs-3',
                    'admin_label' => true,
                    'value' => array(
                        _x('neueste', 'small', 'core') => 'latest',
                        _x('ausgewählte', 'small', 'core') => 'fixed',
                    ),
                    "weight"        => 10,
                ),
                
                // latest posts
                array(
                    'type'        => 'select',
                    'heading'     => __('Post Type', 'core'),
                    'param_name'  => 'pt',
                    'edit_field_class' => 'vc_col-xs-3',
                    'admin_label' => true,
                    'options'     => array(),
                    'dependency'  => array(
                        'element' => 'mode',
                        'value' => array('latest')
                    ),
                    "weight"        => 10,
                ),

                array(
                    'type'        => 'textfield',
                    'heading'     => __('Anzahl der Beiträge', 'core'),
                    'description' => __("„-1“ zeigt alle Beiträge", 'core'),
                    'param_name'  => 'ppp',
                    'value'       => -1,
                    // 'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-3',
                    'dependency'  => array(
                        'element' => 'mode',
                        'value' => array('latest')
                    ),
                    "weight"        => 8,
                ),

                // fixed posts
                array(
                    'type'        => 'param_group',
                    'heading'     => __('Auswahl', 'core'),
                    'param_name'  => 'posts',
                    // 'admin_label' => true,
                    'dependency'  => array(
                        'element' => 'mode',
                        'value' => array('fixed')
                    ),
                    'params'      => array()
                ),

            ), 
            $this->posts_sorting_params_vc(__('Sortierung', 'core'), 'sorting_'),
    
            $this->posts_pagination_params_vc(), 
            $this->posts_pagination2_params_vc(),
            
            $this->posts_anim_params_vc(),
            $this->posts_title_params_vc(),
            $this->posts_layout_params_vc(),
            $this->posts_page_title_params_vc(), 
            $this->post_setup_params_vc( "", array(
                'element' => 'posts_layout',
                'value' => array('horizontal', 'vertical', 'grid', 'single'),
            ) ), 
            $this->post_setup_table_vc( array(
                'element' => 'posts_layout',
                'value' => array('table'),
            ) ),
            $this->post_layout_params_vc() ),
		));
	}
    public function posts_template_vc() {

        $template_type = isset($_POST['post_id']) ? get_the_terms( $_POST['post_id'], 'template_type') : null;
        $template_type = $template_type && isset($template_type[0]) ? $template_type[0]->slug : "";

        $settings = \basics::get_setting(array('site', 'advanced_search'));

        vc_map(array(
            "name"          => __('Gefundene Beiträge', 'core'),
            "description"   => __('Übersicht gefundener Beiträge in „archive“- und „search“-Templates', 'core'),
            "base"          => "vc_posts_tp",
            // "category"      => __("Template", 'core'),
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/posts.svg",
            "params"        => array_merge(array(
                array(
                    "type"    => "info_text",
                    "text"    => 
                        __("Dieses Modul funktioniert wie das Modul „Post Übersicht“, ist aber speziell für „archive“- & „search“-Templates konzipiert. Es werden automatisch alle relevanten Beiträge angezeigt, die gefunden werden konnten.", 'core').
                        "<br><br><i>".
                        __("Beispiel: Wenn der Nutzer auf den Link „2019“ in einem Post Archiv klickt oder in die Suchleiste „2019“ eingibt, werden hier alle Beiträge von 2019 dargestellt.", 'core').
                        "</i>",
                    "styling" => "info", 
                    "param_name" => 'info_general',
                    "weight"        => 10,
                ), 
                // array(
                //     "type"        => 'seperator',
                //     "heading"     => __('Allgemein', 'core'),
                //     "param_name"  => 'seperator_general',
                // ),
                // array(
                //     'type'        => 'checkbox',
                //     'heading'     => __('Übersicht auch auf Suchseiten mit leerem Suchbegriff anzeigen?', 'core'),
                //     'param_name'  => 'show_empty_search',
                //     'value' => array(
                //         __('Ja', 'core') => 'count',
                //     ),
                // ),
            ),
            $this->posts_sorting_params_vc(__('Sortierung', 'core'), 'search_sorting_', array(), true, $template_type),
            (
                $settings['live_search'] === 'true' && $template_type === "search" ? (
                    array_merge(
                        $this->load_more_button(__('Live Search', 'core'), 'load_more_button_'),
                        $this->live_search_labels(__('Live Search', 'core'), 'live_search_label_')
                    )
                ) : array()
            ),
            $this->posts_pagination_params_vc(),
            $this->posts_pagination2_params_vc(),
            $this->posts_title_params_vc(),
            $this->posts_layout_params_vc(true),
            $this->posts_page_title_params_vc(),
            $this->post_setup_params_vc( "", array(
                'element' => 'posts_layout',
                'value' => array('horizontal', 'vertical', 'grid', 'single'),
            ) ),
            $this->post_setup_table_vc( array(
                'element' => 'posts_layout',
                'value' => array('table'),
            ), 'archive' ),
            $this->post_layout_params_vc() ),
		));
	}
    public function posts_details_vc() {
        vc_map(array(
            "name" => __('Ergebnisdetails', 'core'),
            "description" => __('Darstellung von Filterkriterien in „archive“ und „search“-Templates', 'core'),
            "base"          => "vc_posts_details_tp",
            // "category"      => __("Template", 'core'),
            "deprecated"    => "0.8.1",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/posts_detail.svg",
            "params"        => array_merge(array(
                array(
                    "type"    => "info_text",
                    "text"    => __("Mit diesem Modul kannst du bestimmte Informationen einer Suchanfrage oder eines Archivs anzeigen. Es ist speziell für „archive“- & „search“-Templates konzipiert.<br><br><i>Beispiel: Wenn ein Nutzer auf einen Post Archiv-Link klickt oder in der Suche etwas eingibt, kannst du hier Details dieser Suchanfrage, wie z.B. das eingegebene Stichwort (_query_) darstellen.</i>", 'core'),
                    "styling" => "info", 
                    "param_name" => 'info_general',
                ), 
                // title
                array(
                    'type'        => 'textarea',
                    'heading'     => __('Text', 'core'),
                    'description' => __('Im Text können die html-tags &#60;small&#62;, &#60;big&#62; und &#60;strong&#62; sowie folgende Platzhalter verwendet werden:', 'core').
                                        '<br>_post-count_ _page-count_ _page-num_ _posttype_ _category_ _query_',
                    'param_name'  => 'details_title',
                    // 'admin_label' => true,
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Anzeige', 'core'),
                    'param_name'  => 'details_search',
                    // 'edit_field_class' => 'vc_col-xs-6',
                    'value' => array(
                        __('Nur auf Seiten mit Suchergebnissen anzeigen', 'core') => 'show',
                    ),
                ),
                array(
                    'type'        => 'seperator',
                    'heading'     => __('Gestaltung', 'core'),
                    'param_name'  => 'sep_design',
                ),
            ),
            $this->posts_titlestyle_params_vc('details', '') ),
		));
	}
    public function post_template_vc() {
        vc_map(array(
            "name"          => __('Post Elemente', 'core'),
            "description"   => __('Darstellung von Beitragselementen in „single“-Templates', 'core'),
            "base"          => "vc_post_tp",
            // "category"      => __("Template", 'core'),
            "deprecated"    => "0.8.1",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/post.svg",
            "params"        => array_merge(array(
                array(
                    "type"    => "info_text",
                    "text"    => __("Mit diesem Modul kannst du spezielle Informationen eines Beitrags anzeigen, z.B. die Kategorie oder den Autor. Es ist speziell für „single“-Templates konzipiert.", 'core'),
                    "styling" => "info", 
                    "param_name" => 'info_general',
                ), 
            ), 
            $this->post_setup_params_vc("Elemente"), 
            $this->post_layout_params_vc("Elemente") ),
		));
    }
    
    public function posts_posttype_params_vc($pts) {
		$plist = array();
		foreach($pts as $title => $name) {
            array_push($plist, array(
                "type"        => 'select',
                // "heading"     => $pt->labels->singular_name,
                "heading"     => $title,
                "param_name"  => 'posts_'.$name.'_id',
                'admin_label' => true,
                'edit_field_class' => 'vc_col-xs-6',
                "options" 	  => helper::get_vc_posts($name),
                'dependency'  => array(
                    'element' => 'posts_pt',
                    'value' => array($name)
                ),
            ));
		}
		return $plist;
    }
    public function posts_title_params_vc($group='') {
        $group = empty($group) ? __('Erweitert', 'core') : $group;
        return array_merge(array(
            array(
                "type"        => 'seperator',
                "heading"     => __('Überschriften', 'core'),
                "param_name"  => 'seperator_headlines',
                "group"       => $group,
            ),
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Überschrift ganz oben', 'core'),
                "param_name"  => 'seperator_title',
                "group"       => $group,
            ),
            // title
            array(
                'type'        => 'textarea',
                'heading'     => '',
                // 'heading'     => __('Überschrift ganz oben', 'core'),
                'description' => __('Im Text können die html-tags &#60;small&#62;, &#60;big&#62; und &#60;strong&#62; sowie folgende Platzhalter verwendet werden:<br>_post-count_ _page-count_ _page-num_ _posttype_ _category_ _tag_ _query_', 'core'),
                'param_name'  => 'title',
                // 'admin_label' => true,
                "group"       => $group,
            ),
        ),
        $this->posts_titlestyle_params_vc('', $group) );
    }
    public function posts_page_title_params_vc($group='') {
        $group = empty($group) ? __('Erweitert', 'core') : $group;
        return array_merge(array(
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Überschrift pro Seite', 'core'),
                "param_name"  => 'seperator_page_title',
                "group"       => $group,
            ),
            // position
            array(
                'type' => 'dropdown',
                'heading' => __('Position', 'core'),
                'param_name' => 'page_title_layout',
                // 'admin_label' => true,
                'edit_field_class' => 'vc_col-xs-3',
                'value' => array(
                    _x('oberhalb der Seite', 'small', 'core') => 'top',
                    _x('unterhalb der Seite', 'small', 'core') => 'bottom',
                ),
                "group"       => $group,
            ),
            // title
            array(
                'type'        => 'textarea',
                'heading'     => '',
                // 'heading'     => __('Titel', 'core').' '.__('<u>pro Seite</u>', 'core'),
                'description' => __('Im Text können die html-tags &#60;small&#62;, &#60;big&#62; und &#60;strong&#62; sowie folgende Platzhalter verwendet werden:<br>_post-count_ _page-count_ _page-num_ _posttype_ _category_ _tag_ _query_', 'core'),
                'param_name'  => 'page_title',
                // 'admin_label' => true,
                "group"       => $group,
            ),
        ),
        $this->posts_titlestyle_params_vc('page', $group) );
    }

    public function posts_titlestyle_params_vc($pre="", $group='') {
        if ($pre != "" && !strpos($pre, "_"))$pre .= "_";
        $group = empty($group) ? __('Erweitert', 'core') : $group;
        return array(
            // title -> pull size color
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrich&shy;tung', 'core'),
                    "param_name"    => $pre."title_pull",
                    'edit_field_class' => 'vc_col-xs-4',
                    "value"         => array(
                        _x('linksbündig', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => '_center',
                        _x('rechtsbündig', 'small', 'core') => "_right",
                    ),
                    "group"       => $group,
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Überschrifts&shy;einheit', 'core'),
                    "param_name"    => $pre."title_size",
                    'edit_field_class' => 'vc_col-xs-4',
                    "value" => array(
                        _x('keine Überschriftseinheit', 'small', 'core') => 'normal',
                        //__('Bold', 'core') => 'strong',
                        'H1' => 'h1',
                        'H2' => 'h2',
                        'H3' => 'h3',
                        'H4' => 'h4',
                        'H5' => 'h5',
                        'H6' => 'h6',
                    ),
                    "group"       => $group,
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Schrift&shy;schnitt', 'core'),
                    "param_name"    => $pre."title_weight",
                    'edit_field_class' => 'vc_col-xs-4',
                    "value"		  	=> array(
                        _x('Standard', 'small', 'core') => '',
                        __('100 - extra thin', 'core') => '100',
                        __('300 - light', 'core') => '300',
                        __('400 - regular', 'core') => '400',
                        __('600 - semi-bold', 'core') => '600',
                        __('700 - bold', 'core') => '700',
                    ),
                    "group"       => $group,
                ),
                array(
                    "type"          => "colorselect",
                    "heading"       => __('Schriftfarbe', 'core'),
                    "param_name"    => $pre."title_color",
                    'edit_field_class' => 'vc_col-xs-6',
                    "group"       => $group,
                ),
        );
    }
	public function posts_layout_params_vc($is_template=false) {

        $layout_options = array(
            'grid' => _x('als Raster', 'small', 'core'),
            'horizontal' => _x('nebeneinander', 'small', 'core'),
            'vertical' => _x('untereinander', 'small', 'core'),
            'single' => _x('einzeln (als Slider)', 'small', 'core'),
            'table' => _x('als Tabelle', 'small', 'core'),
        );
        if ( $is_template ) {
            unset($layout_options['single']);
        }
        $layout_options = array_flip($layout_options);

		return array_merge(
            array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Layout', 'core'),
                    "param_name"  => 'seperator_overview',
                ),
                array(
                    'type' => 'dropdown',
                    'heading' => __('Anordnung', 'core'),
                    'description'   => __('Wie sollen die einzelnen Beiträge angeordnet werden?', 'core'),
                    'param_name' => 'posts_layout',
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-4',
                    'value' => $layout_options,
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Spaltenanzahl', 'core'),
                    'param_name'  => 'posts_columns',
                    'value'       => 5,
                    'edit_field_class' => 'vc_col-xs-2',
                    'dependency'  => array(
                        'element' => 'posts_layout',
                        'value' => array('horizontal', 'grid')
                    ),
                ),
            ),
            $is_template ? array() : array(
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Zeilenanzahl', 'core'),
                    'param_name'  => 'posts_rows',
                    'value'       => 5,
                    'edit_field_class' => 'vc_col-xs-2',
                    'dependency'  => array(
                        'element' => 'posts_layout',
                        'value' => array('vertical', 'grid', 'table')
                    ),
                ),
            ),
            array(
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core').' <u>'.__('zwischen den Beiträgen', 'core').'</u>',
                    'description'   => __('in px', 'core'),
                    'param_name'    => 'posts_padding',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value'         => '40px',
                    'dependency'  => array(
                        'element'   => 'posts_layout',
                        'value' => array('horizontal', 'vertical', 'grid')
                    ),
                ),
                array(
                    'type' => 'info_text',
                    'text' => __( 'Du kannst das Aussehen der Pfeile und Paginierung im zweiten Tab einstellen. Weitere Einstellungen zur Animation und Verhalten des Sliders findest du im Tab \'Erweitert\'.<br><br>Alle Einstellungen stehen dir auch für die anderen Layouts zur Verfügung.', 'core' ),
                    'param_name' => 'info_after_posts_layout',
                    'styling' => 'info',
                    'edit_field_class' => 'vc_col-xs-8',
                    'dependency'  => array(
                        'element'   => 'posts_layout',
                        'value'     => 'single'
                    ),
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core').' <u>'.__('darunter', 'core').'</u>',
                    'description'   => __('in px', 'core').' ('.sprintf(__('Standard: %s', 'core'), '30px').')',
                    'param_name'    => 'posts_margin_bottom',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value'         => '30px',
                ),
            ),
            $is_template ? array(
                array(
                    "type"    => "info_text",
                    "text"    => 
                        __("Die Anzahl der Beiträge wird durch die allgemeine WordPress Option 'Blogseiten zeigen maximal' kontrolliert. Diese kannst du hier einstellen:", 'core').
                        " <a href=".admin_url( "options-reading.php" )." target='_blank'>".__("Einstellungen > Lesen", "core")."</a>",
                    "styling" => "info", 
                    "param_name" => 'info_posts_template',
                    // 'edit_field_class' => 'vc_col-xs-8',
                    'dependency'  => array(
                        'element' => 'posts_layout',
                        'value' => array('vertical', 'grid', 'table')
                    ),
                ),
            ) : array(),
            array(
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Responsives Verhalten', 'core'),
                    'param_name'  => 'responsive_breaks',
                    'value' => array(
                        __('Breakpoints manuell anpassen', 'core') => 'manual',
                    ),
                    'dependency'  => array(
                        'element'   => 'posts_layout',
                        'value' => array('horizontal', 'grid')
                    ),
                ),
                array(
                    "type"        => 'seperator',
                    // "heading"     => __('Layout', 'core'),
                    "param_name"  => 'seperator_responsive',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                ),

                // tablet
                array(
                    "type"        => 'sub_seperator',
                    "heading"     => '<u>'.__('Tablets', 'core').' ('.__('768 bis 1024px', 'core').')</u>',
                    "param_name"  => 'sub_seperator_spacing_lg',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                array(
                    "type"        => 'sub_seperator',
                    "heading"     => '<u>'.__('Kleine Tablets', 'core').' ('.__('481 bis 767px', 'core').')</u>',
                    "param_name"  => 'sub_seperator_spacing_md',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                array(
                    "type"        => 'sub_seperator',
                    "heading"     => '<u>'.__('Mobilgeräte', 'core').' ('.__('bis 480px', 'core').')</u>',
                    "param_name"  => 'sub_seperator_spacing_sm',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),

                array(
                    'type'          => 'range',
                    'label'         => array(
                        "lbl" => __('Spaltenanzahl', 'core').': ',
                    ),
                    'param_name'    => 'post_columns_lg',
                    'input_attrs'   => array( "min" => 1, "max" => 8, "step" => 1 ),
                    'value'         => '3',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                array(
                    'type'          => 'range',
                    'label'         => array(
                        "lbl" => __('Spaltenanzahl', 'core').': ',
                    ),
                    'param_name'    => 'post_columns_md',
                    'input_attrs'   => array( "min" => 1, "max" => 8, "step" => 1 ),
                    'value'         => '2',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                array(
                    'type'          => 'range',
                    'label'         => array(
                        "lbl" => __('Spaltenanzahl', 'core').': ',
                    ),
                    'param_name'    => 'post_columns_sm',
                    'input_attrs'   => array( "min" => 1, "max" => 8, "step" => 1 ),
                    'value'         => '1',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),

                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core').' <u>'.__('zwischen den Beiträgen', 'core').'</u>',
                    'description'   => __('in px', 'core'),
                    'param_name'    => 'posts_padding_lg',
                    'value'         => '20px',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core').' <u>'.__('zwischen den Beiträgen', 'core').'</u>',
                    'description'   => __('in px', 'core'),
                    'param_name'    => 'posts_padding_md',
                    'value'         => '15px',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core').' <u>'.__('zwischen den Beiträgen', 'core').'</u>',
                    'description'   => __('in px', 'core'),
                    'param_name'    => 'posts_padding_sm',
                    'value'         => '10px',
                    'dependency'  => array(
                        'element' => 'responsive_breaks',
                        'value' => array('manual')
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                ),
            )
        );
    }
	public function posts_anim_params_vc($group='') {
        $group = empty($group) ? __('Erweitert', 'core') : $group;
		return array(
            array(
                "type"        => 'seperator',
                "heading"     => __('Animation', 'core'),
                "param_name"  => 'seperator_animation',
                'group'       => $group,
                "weight"      => 6
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Animation', 'core'),
                'param_name' => 'posts_animation',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    _x('Slide', 'small', 'core') => 'slide',
                    _x('Fade', 'small', 'core') => 'fade',
                    _x('keine', 'small', 'core') => 'none',
                ),
                // 'dependency'  => array(
                //     'element'   => 'posts_layout',
                //     'value'     => 'single'
                // ),
                'group' => $group
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Höhe des Sliders', 'core'),
                'param_name' => 'posts_height',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    _x('so hoch wie höchster Slide', 'small', 'core') => 'auto',
                    _x('automatisch anpassen', 'small', 'core') => 'max',
                    _x('Höhe eingeben', 'small', 'core') => 'custom',
                ),
                // 'dependency'  => array(
                //     'element'   => 'posts_layout',
                //     'value'     => 'single'
                // ),
                'group' => $group
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Höhe', 'core'),
                'description'   => __('in px, em oder vh', 'core'),
                'param_name'    => 'posts_height_custom',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '500px',
                'dependency'  => array(
                    'element'   => 'posts_height',
                    'value' => array('custom')
                ),
                'group' => $group
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Höhe mobil', 'core'),
                'description'   => __('in px, em oder vh', 'core'),
                'param_name'    => 'posts_height_custom_mobile',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element'   => 'posts_height',
                    'value' => array('custom')
                ),
                'group' => $group
            ),
            
            array(
                'type'        => 'checkbox',
                'heading'     => __('Verhalten', 'core'),
                'param_name'  => 'posts_scroll_top',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    __('nach oben scrollen', 'core') => 'enable',
                ),
                'description'   => __('Beim Wechsel des Slides wird automatisch nach oben zum Anfang des Moduls gescrollt.', 'core'),
                'group' => $group
            ),
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_after_height',
                'group' => $group
            ),
            
            array(
                'type'        => 'checkbox',
                'heading'     => __('Loop', 'core'),
                'description'   => __('Nach dem letzten Slide wird wieder der Erste dargestellt.', 'core'),
                'param_name'  => 'posts_loop',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    __('aktivieren', 'core') => 'enable',
                ),
                'group' => $group
            ),
            array(
                'type'        => 'checkbox',
                'heading'     => __('Autoplay', 'core'),
                'description'   => __('Die Slides werden automatisch abgespielt.', 'core'),
                'param_name'  => 'posts_autoplay',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    __('aktivieren', 'core') => 'enable',
                ),
                'group' => $group
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Intervall (in s)', 'core'),
                'description'   => __('Alle x Sekunden wird zum nächsten Slide gewechselt.', 'core'),
                'param_name'    => 'posts_interval',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '5',
                'dependency'  => array(
                    'element'   => 'posts_autoplay',
                    'value' => array('enable')
                ),
                'group' => $group
            ),
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_after_autoplay',
                'group' => $group
            ),

            // ID
            array(
                'type'          => 'textfield',
                'heading'       => __('ID', 'core'),
                'description'   => __('Mittels einer eindeutigen ID kann das Element per Javascript angesteuert und die Events <b>next</b>, <b>prev</b>, <b>first</b>, <b>last</b>, <b>pause</b> und <b>play</b> getriggert werden.', 'core'),
                'param_name'    => 'posts_id',
                'edit_field_class' => 'vc_col-xs-8',
                'group' => $group
            ),
        );
    }
	public function post_setup_params_vc($single='', $dependency=[], $is_template=false) {

        $single = empty($single) ? __('Beiträge', 'core') : $single;
        $elements = array(
            _x('bitte auswählen', 'small', 'core') => '',
            _x('Titel', 'small', 'core') => 'title',
            _x('Bild', 'small', 'core') => 'image',
            _x('Inhalt', 'small', 'core') => 'content',
            _x('Autor', 'small', 'core') => 'author',
            _x('Kategorien', 'small', 'core') => 'categories',
            _x('Schlagwörter', 'small', 'core') => 'tags',
            _x('Datum', 'small', 'core') => 'date',
            _x('Weiterlesen Link', 'small', 'core') => 'link',
            _x('Leerer Bereich', 'small', 'core') => 'empty',
            _x('Text', 'small', 'core') => 'text',
            _x('Trennlinie', 'small', 'core') => 'seperator',
        );

        // for testing
        if(true) $elements[_x('Website Titel', 'small', 'core')] = 'site_title';

        if (helper::is_active_plugin('woocommerce/woocommerce.php')) {
            $elements[_x('Produkt Preis', 'small', 'core')] = 'price';
            $elements[_x('Kurzbeschreibung Warenkorb', 'small', 'core')] = 'cart-excerpt';
            $elements[_x('Warenkorb Link', 'small', 'core')] = 'cart';
            $elements[_x('Woo Ajax Button', 'small', 'core')] = 'woo_ajax';
        }
        
		return array(
            array(
                "type"        => 'seperator',
                "heading"     => sprintf(__('Aufbau der %s', 'core'), $single),
                "param_name"  => 'seperator_preview',
                'dependency'  => $dependency,
            ),
            // setup mode
            array(
                'type'          => 'switch',
                'param_name'    => 'post_setup_mode',
                'heading'       => sprintf(__('Layout der %s', 'core'), $single),
                // 'text'          => __('Text zur Info.', 'core'),
                // 'value'         => 'static',
                'params'        => array(
                    'manual' => _x( 'manuell', 'small', 'core'),
                    'template' => _x( 'Template verwenden', 'small', 'core'),
                ),
                'edit_field_class' => 'vc_col-xs-12'.($single == "Elemente" ? ' hidden' : ''),
                'admin_label' => true,
                'dependency'  => $dependency,
            ),
            
            // manual
            array(
                'type'        => 'param_group',
                'heading'     => '',
                // 'heading'     => __('Aufbau und Reihenfolge', 'core').' <u>'.__('der Post Elemente', 'core').'</u>',
                'param_name'  => 'post_setup',
                //'admin_label' => true,
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('manual')
                ),
                'params'      => array_merge(array(
                        array(
                            'type' => 'dropdown',
                            'heading' => __('Post Element', 'core'),
                            'param_name' => 'post_element',
                            'admin_label' => true,
                            'value' => $elements,
                            'edit_field_class' => 'vc_col-xs-6',
                        ),
                        array(
                            "type"        => 'new_line',
                            "param_name"  => 'new_line_after_post_element',
                        ),
                        
                        // text
                        array(
                            'type'        => 'textarea',
                            'heading'     => __('Inhalt', 'core'),
                            "description" => __("Es können die html-tags &#60;small&#62;, &#60;big&#62; und &#60;strong&#62;<br>sowie folgende Platzhalter verwendet werden:<br>_num_ _count_ _posttype_ _title_ _site-title_ _author_ _date_", 'core'),
                            'param_name'  => 'text_content',
                            'edit_field_class' => 'vc_col-xs-12',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('text')
                            ),
                        ),
                        // linktext
                        array(
                            'type'        => 'textfield',
                            'heading'     => __('Linktext', 'core'),
                            //"description"    => __("Es können die html-tags &#60;small&#62;, &#60;big&#62; und &#60;strong&#62;<br>sowie folgende Platzhalter verwendet werden:<br>_num_ _count_ _posttype_ _title_ _author_ _date_", 'core'), // Textblock (optional)
                            'param_name'  => 'link_text',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('link')
                            ),
                        ),
                        // date
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Datumsformat', 'core'),
                            "param_name"    => "date_format",
                            'edit_field_class' => 'vc_col-xs-3',
                            "value" => array(
                                _x('Standardformat', 'small', 'core') => '',
                                _x('TT.MM.JJJJ', 'small', 'core') => 'd.m.Y',
                                _x('TT.MM.JJ', 'small', 'core') => 'd.m.y',
                                _x('TT.MM', 'small', 'core') => 'd.m',
                                _x('Tag TT.MM.JJJJ', 'small', 'core') => 'l d.m.Y',
                                _x('Tag TT.MM.JJ', 'small', 'core') => 'l d.m.y',
                                _x('Tag TT.MM.', 'small', 'core') => 'l d.m',
                                _x('T. Monat JJJJ', 'small', 'core') => 'j. F Y',
                                _x('T. Monat JJ', 'small', 'core') => 'j. F y',
                                _x('T. Monat', 'small', 'core') => 'j. F',
                                _x('Tag T. Monat JJJJ', 'small', 'core') => 'l j. F Y',
                                _x('Tag T. Monat JJ', 'small', 'core') => 'l j. F y',
                                _x('Tag T. Monat', 'small', 'core') => 'l j. F',
                                _x('nur Jahr', 'small', 'core') => 'Y',
                                _x('Uhrzeit (h:i)', 'small', 'core') => 'G:i',
                                _x('Uhrzeit mit Sekunden (H:i:s)', 'small', 'core') => 'H:i:s',
                                _x('Stunden', 'small', 'core') => 'G',
                                _x('Minuten', 'small', 'core') => 'm',
                                _x('Sekunden', 'small', 'core') => 's',
                            ),
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('date')
                            ),
                        ),
                        // empty
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Basishöhe bzw. -breite', 'core').'<br><u>'.__('wird je Breakpoint skaliert', 'core').'</u>',
                            'description'   => __('in px', 'core'),
                            'param_name'    => 'empty_size',
                            'edit_field_class' => 'vc_col-xs-4',
                            'value'         => '20px',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('empty')
                            ),
                        ),
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Mobil', 'core').'<br><u>'.__('bis 480px', 'core').'</u>',
                            'param_name'    => 'empty_size_xs',
                            'edit_field_class' => 'vc_col-xs-2',
                            'value'         => '100%',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('empty')
                            ),
                        ),
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Kleines Tablet', 'core').'<br><u>'.__('481 bis 767px', 'core').'</u>',
                            'param_name'    => 'empty_size_sm',
                            'edit_field_class' => 'vc_col-xs-2',
                            'value'         => '100%',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('empty')
                            ),
                        ),
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Tablet', 'core').'<br><u>'.__('768 bis 1024px', 'core').'</u>',
                            'param_name'    => 'empty_size_md',
                            'edit_field_class' => 'vc_col-xs-2',
                            'value'         => '100%',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('empty')
                            ),
                        ),
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Desktop', 'core').'<br><u>'.__('ab 1025px', 'core').'</u>',
                            'param_name'    => 'empty_size_lg',
                            'edit_field_class' => 'vc_col-xs-2',
                            'value'         => '100%',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('empty')
                            ),
                        ),

                        // all
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Ausrichtung', 'core'),
                            // "description"   => __('Hier können Sie angeben, wie das Bild positioniert werden soll', 'core'),
                            "param_name"    => "pull",
                            'edit_field_class' => 'vc_col-xs-3',
                            "value"         => array(
                                _x('linksbündig', 'small', 'core') => '',
                                _x('zentriert', 'small', 'core') => '_center',
                                _x('rechtsbündig', 'small', 'core') => "_right",
                            ),
                            'dependency'  => array(
                                'element'   => 'post_element',
                                'value'     => array( 'title', 'image', 'content', 'author', 'categories', 'tags', 'date', 'link', 'text', 'seperator', 'site_title')
                            ),
                        ),
                        // title
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Schriftgröße', 'core'),
                            // "description"   => __('Größe des Beitragstitels', 'core'),
                            "param_name"    => "title_size",
                            'edit_field_class' => 'vc_col-xs-3',
                            "value" => array(
                                _x('Standard', 'small', 'core') => 'normal',
                                _x('Bold', 'small', 'core') => 'strong',
                                'H1' => 'h1',
                                'H2' => 'h2',
                                'H3' => 'h3',
                                'H4' => 'h4',
                                'H5' => 'h5',
                                'H6' => 'h6',
                            ),
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('title', 'site_title')
                            ),
                        ),
                        // content author categories tags date text
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Schriftgröße', 'core'),
                            "param_name"    => "text_size",
                            'edit_field_class' => 'vc_col-xs-3',
                            "value" => array(
                                _x('Standard', 'small', 'core') => 'normal',
                                _x('bold', 'small', 'core') => 'bold',
                                _x('klein (85%)', 'small', 'core') => 'small',
                                _x('groß (110%)', 'small', 'core') => 'big',
                                _x('maximal (120%)', 'small', 'core') => 'bigger',

                            ),
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('content', 'author', 'categories', 'tags', 'date', 'text')
                            ),
                        ),
                        // title content author categories tags date text
                        array(
                            "type"          => "colorselect",
                            "heading"       => __('Schriftfarbe', 'core'),
                            'param_name'  => 'text_color',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('title', 'content', 'author', 'categories', 'tags', 'date', 'text', 'site_title')
                            ),
                        ),
                        // image link
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Breite', 'core'),
                            'description'   => __('in px oder %', 'core'),
                            'param_name'    => 'content_width',
                            'edit_field_class' => 'vc_col-xs-3',
                            'value'         => '100%',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('image', 'link', 'cart', 'woo_ajax')
                            ),
                        ),
                        // image author categories tags
                        array(
                            'type'          => 'checkbox',
                            'heading'       => __('Verlinken', 'core'),
                            'param_name'    => 'link_to',
                            'edit_field_class' => 'vc_col-xs-3',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('image', 'author', 'categories', 'tags')
                            ),
                        ),
                        // title
                        array(
                            'type'          => 'checkbox',
                            'heading'       => __('Versal', 'core'),
                            'description'   => __('Text in Großbuchstaben anzeigen.', 'core'),
                            'param_name'    => 'title_versal',
                            'edit_field_class' => 'vc_col-xs-3',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('title')
                            ),
                        ),
                        // content
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Zeichenanzahl', 'core').' <u>'.__('der Vorschau', 'core').'</u>',
                            'description'   => __("„-1“ zeigt den kompletten Inhalt", 'core'),
                            'param_name'    => 'content_length',
                            'edit_field_class' => 'vc_col-xs-3',
                            'value'         => '200',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('content')
                            ),
                        ),
                        // author
                        // categories
                        // tags

                    ),
                    // Icon
                    helper::custom_icon_params_vc('link_', 'post_element', array('link')),
                    array(
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Darstellung', 'core'),
                            // "description"   => __('', 'core'),
                            "param_name"    => "link_style",
                            'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                            "value" => array(
                                _x('primärer Link', 'small', 'core') => '',
                                _x('sekundärer Link', 'small', 'core') => '_link _sec',
                                _x('primärer Button', 'small', 'core') => '_button',
                                _x('sekundärer Button', 'small', 'core') => "_button _sec",
                                _x('alternativer Button', 'small', 'core') => "_button _trd",
                                _x('individuell überschreiben', 'small', 'core') => "custom",
                            ),
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('link')
                            ),
                        ),
                    ),
                    // custom link
                    helper::custom_element_params_vc('link_', 'link_style', 'custom'),

                    // cart
                    array(
                        array(
                            'type'        => 'textarea',
                            'heading'     => __('Linktext', 'core'),
                            'description' => __('Es können die html-tags &#60;small&#62;, &#60;big&#62; und &#60;strong&#62;<br> sowie folgende Platzhalter verwendet werden:<br>_num_ _count_ _posttype_ _title_ _author_ _date_', 'core'),
                            'param_name'  => 'cart_text',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('cart')
                            ),
                        ),
                    ),
                    helper::custom_icon_params_vc('cart_', 'post_element', array('cart')),
                    array(
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Darstellung', 'core'),
                            // "description"   => __('', 'core'),
                            "param_name"    => "cart_style",
                            'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                            "value" => array(
                                _x('primärer Link', 'small', 'core') => '',
                                _x('sekundärer Link', 'small', 'core') => '_link _sec',
                                _x('primärer Button', 'small', 'core') => '_button',
                                _x('sekundärer Button', 'small', 'core') => "_button _sec",
                                _x('alternativer Button', 'small', 'core') => "_button _trd",
                                _x('individuell überschreiben', 'small', 'core') => "custom",
                            ),
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('cart')
                            ),
                        ),
                    ),
                    helper::custom_element_params_vc('cart_', 'cart_style', 'custom'),

                    // woo_ajax
                    array(
                        array(
                            'type'        => 'textarea',
                            'heading'     => __('Linktext', 'core'),
                            'description' => __('Es können die html-tags &#60;small&#62;, &#60;big&#62; und &#60;strong&#62;<br> sowie folgende Platzhalter verwendet werden:<br>_num_ _count_ _posttype_ _title_ _author_ _date_', 'core'),
                            'param_name'  => 'woo_ajax_text',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('woo_ajax')
                            ),
                        ),
                        array(
                            'type'        => 'dropdown',
                            'heading'     => __('Weiterleiten', 'core'),
                            'param_name'  => 'woo_ajax_redirect',
                            'edit_field_class' => 'vc_col-xs-4',
                            "value" => array(
                                _x('Standard', 'small', 'core') => 'default',
                                _x('zum Warenkorb', 'small', 'core') => 'cart',
                                _x('zur Kasse', 'small', 'core') => 'checkout',
                                _x('zum Shop', 'small', 'core') => "shop",
                                _x('nicht weiterleiten', 'small', 'core') => "false",
                            ),
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('woo_ajax')
                            ),
                        ),
                        array(
                            'type'        => 'checkbox',
                            'heading'     => __('Nicht doppelt hinzufügen', 'core'),
                            'param_name'  => 'woo_ajax_not_twice',
                            'edit_field_class' => 'vc_col-xs-4',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('woo_ajax')
                            ),
                        ),
                        array(
                            'type'        => 'checkbox',
                            'heading'     => __('Warenkorb davor leeren', 'core'),
                            'param_name'  => 'woo_ajax_clear',
                            'edit_field_class' => 'vc_col-xs-4',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('woo_ajax')
                            ),
                        ),
                    ),
                    helper::custom_icon_params_vc('woo_ajax_', 'post_element', array('woo_ajax')),
                    array(
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Darstellung', 'core'),
                            // "description"   => __('', 'core'),
                            "param_name"    => "woo_ajax_style",
                            'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                            "value" => array(
                                _x('primärer Link', 'small', 'core') => '',
                                _x('sekundärer Link', 'small', 'core') => '_link _sec',
                                _x('primärer Button', 'small', 'core') => '_button',
                                _x('sekundärer Button', 'small', 'core') => "_button _sec",
                                _x('alternativer Button', 'small', 'core') => "_button _trd",
                                _x('individuell überschreiben', 'small', 'core') => "custom",
                            ),
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('woo_ajax')
                            ),
                        ),
                    ),
                    helper::custom_element_params_vc('woo_ajax_', 'woo_ajax_style', 'custom'),

                    array(

                        // seperator
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Höhe bzw. Breite', 'core'),
                            'description'   => __('in px oder %', 'core'),
                            'param_name'    => 'sep_size',
                            'edit_field_class' => 'vc_col-xs-3',
                            'value'         => '100%',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('seperator')
                            ),
                        ),
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Stärke', 'core'),
                            'description'   => __('in px', 'core'),
                            'param_name'    => 'sep_width',
                            'edit_field_class' => 'vc_col-xs-3',
                            'value'         => '5px',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('seperator')
                            ),
                        ),
                        array(
                            'type'          => 'dropdown',
                            'heading'       => __('Stil', 'core'),
                            'param_name'    => 'sep_style',
                            'value'         => helper::get_border_styles(),
                            'edit_field_class' => 'vc_col-xs-3',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('seperator')
                            ),
                        ),
                        array(
                            "type"          => "colorselect",
                            'heading'     => __('Farbe', 'core'),
                            'param_name'  => 'sep_color',
                            'edit_field_class' => 'vc_col-xs-12',
                            'dependency'  => array(
                                'element' => 'post_element',
                                'value' => array('seperator')
                            ),
                        ),
                    )
                )
            ),
            // template
            array(
                "type"          => "select",
                "heading"       => __('Template auswählen', 'core'),
                "description"   => __('Welches Template soll eingefügt werden?', 'core'),
                "param_name"    => "post_template",
                // 'admin_label'   => true,
                'options'         => helper::get_vc_templates((isset($_POST['post_id']) ? $_POST['post_id'] : false)),
                "edit_field_class" => 'vc_col-xs-6',
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('template')
                ),
            ),

            array(
                'type'          => 'checkbox',
                'heading'       => __('Seitliches Gutter', 'core'),
                "description"   => __('Durch diese Option kannst du das Template seitlich bündig darstellen.', 'core'),
                'param_name'    => 'post_template_options',
                'value' => array(
                    // _x('erste Zeile auf volle Breite setzen', 'small', 'core') => 'ignore_row',
                    _x('ignorieren (empfohlen)', 'small', 'core') => 'ignore_gutter',
                ),
                'edit_field_class' => 'vc_col-xs-6',
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('template')
                ),
            ),
            array(
                "type"          => "seperator",
                "heading"       => __('Inhalte', 'core'),
                "param_name"    => "seperator_content",
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('template')
                ),
            ),
            // dynamic content
            array(
                'type'          => 'dynamic_content',
                'param_name'    => 'dynamic_post_content',
                'params'        => array(
                    'field' => 'post_template',
                    'tags' => 'single'
                ),
                'edit_field_class' => 'vc_col-xs-12',
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('template')
                ),
            ),
        );
    }
    public function post_setup_table_vc($dependency=[], $module='normal') {
        
        $types = array(
            _x('Text', 'small', 'core')         => 'text',
            _x('Bild', 'small', 'core')         => 'img',
            _x('Button', 'small', 'core')       => 'btn'
        );
        $sort_dependency = array(
            'element' => 'type',
            'value' => array('text')
        );
        if ( $module !== 'normal' ) {
            $types[ _x('Post Element', 'small', 'core') ] = 'post';
            $sort_dependency = array(
                'element' => 'post_value',
                'value' => array('title', 'content', 'author', 'date', 'category', 'tag', 'taxonomy', 'site_title')
            );
        }
        
        $post_elements = array(
            _x('Titel', 'small', 'core') => 'title',
            _x('Bild', 'small', 'core') => 'image',
            _x('Inhalt', 'small', 'core') => 'content',
            _x('Autor', 'small', 'core') => 'author',
            _x('Datum', 'small', 'core') => 'date',
            _x('Kategorien', 'small', 'core') => 'category',
            _x('Schlagwörter', 'small', 'core') => 'tag',
            _x('Individuelle Taxonomie', 'small', 'core') => 'taxonomy',
            _x('Website Titel', 'small', 'core') => 'site_title'
        );
        

        return array(
            array(
                "type"        => 'seperator',
                "heading"     => __('Spalten einstellen', 'core'),
                "param_name"  => 'seperator_table',
                'dependency'  => $dependency,
            ),
            
            // rows
            array(
                'type'        => 'param_group',
                'heading'     => '',
                'param_name'  => 'table_setup',
                'dependency'  => $dependency,
                'params'      => array_merge(
                    array(
                        
                        // type
                        array(
                            'type' => 'dropdown',
                            'heading' => __('Typ', 'core'),
                            'param_name' => 'type',
                            'admin_label' => true,
                            'edit_field_class' => 'vc_col-xs-6',
                            'value' => $types,
                        ),
                        array(
                            'type' => 'dropdown',
                            'heading' => __('Post Element', 'core'),
                            'param_name' => 'post_value',
                            'edit_field_class' => 'vc_col-xs-6',
                            'value' => $post_elements,
                            'dependency' => array(
                                'element' => 'type',
                                'value' => array('post')
                            ),
                        ),
                        array(
                            'type' => 'dropdown',
                            'heading' => __('Taxonomie wählen', 'core'),
                            'param_name' => 'post_taxonomy',
                            'edit_field_class' => 'vc_col-xs-6',
                            'value' => array(
                                _x('bitte wählen', 'small', 'core') => '',
                            ),
                            'dependency' => array(
                                'element' => 'post_value',
                                'value' => array('taxonomy')
                            ),
                        ),
                        
                        // head
                        array(
                            "type"        => 'sub_seperator',
                            "heading"     => __('Allgemein', 'core'),
                            "param_name"  => 'seperator_th',
                        ),
                        array(
                            'type' => 'textfield',
                            'heading' => __('Kopfzeile', 'core'),
                            'param_name' => 'title',
                            'admin_label' => true,
                            'edit_field_class' => 'vc_col-xs-6',
                        ),
                        array(
                            "type"        => 'new_line',
                            "param_name"  => 'new_line_title',
                        ),
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Ausrichtung', 'core'),
                            "param_name"    => "align",
                            'edit_field_class' => 'vc_col-xs-4',
                            "value" => array(
                                _x('linksbündig', 'small', 'core') => 'left',
                                _x('zentriert', 'small', 'core') => 'center',
                                _x('rechtsbündig', 'small', 'core') => 'right',
                            )
                        ),
                        array(
                            'type' => 'checkbox',
                            'heading' => __('Spalte sortierbar', 'core'),
                            'param_name' => 'sortable',
                            'edit_field_class' => 'vc_col-xs-4',
                            'value' => array(
                                __('Ja', 'core') => 'true',
                            ),
                            'dependency' => $sort_dependency,
                        ),
                        array(
                            'type' => 'checkbox',
                            'heading' => __('Mobil', 'core'),
                            'param_name' => 'hide_mobile',
                            'edit_field_class' => 'vc_col-xs-4',
                            'value' => array(
                                __('Spalte ausblenden', 'core') => 'true',
                            )
                        ),
                        
                        // contents
                        array(
                            "type"        => 'sub_seperator',
                            "heading"     => __('Inhalt', 'core'),
                            "param_name"  => 'seperator_td',
                        ),
                        
                        // text
                        array(
                            'type' => 'textarea',
                            'heading' => __('Feldwert', 'core'),
                            'param_name' => 'text_value',
                            'admin_label' => true,
                            'edit_field_class' => 'vc_col-xs-12 dynamic_single_field',
                            'description' => __('Dynamische Platzhalter können erst nach Abspeichern des Moduls angezeigt werden.', 'core'),
                            'dependency' => array(
                                'element' => 'type',
                                'value' => array('text')
                            ),
                        ),
                        array(
                            "type"          => "colorselect",
                            "heading"       => __('Schriftfarbe', 'core'),
                            'param_name'  => 'text_color',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency' => array(
                                'element' => 'type',
                                'value' => array('text')
                            ),
                        ),
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Formatierung', 'core'),
                            "param_name"    => "text_format",
                            'edit_field_class' => 'vc_col-xs-6',
                            "value" => array(
                                _x('Standard', 'small', 'core') => 'normal',
                                _x('bold', 'small', 'core') => 'bold',
                                _x('kursiv', 'small', 'core') => 'italic',
                                _x('klein (85%)', 'small', 'core') => 'small',
                                _x('groß (110%)', 'small', 'core') => 'big',
                                _x('maximal (120%)', 'small', 'core') => 'bigger',

                            ),
                            'dependency'  => array(
                                'element' => 'type',
                                'value' => array('text')
                            ),
                        ),
                        array(
                            'type' => 'checkbox',
                            'param_name' => 'text_link',
                            'edit_field_class' => 'vc_col-xs-12',
                            'value' => array(
                                __('Beitrag verlinken', 'core') => 'true',
                            ),
                            'dependency'  => array(
                                'element' => 'type',
                                'value' => array('text')
                            ),
                        ),
                        
                        // image
                        array(
                            'type'          => 'file_picker',
                            'heading'       => __('Bild', 'core'),
                            'param_name'    => 'img_value',
                            'edit_field_class' => 'vc_col-xs-12 dynamic_single_field',
                            'description' => __('Dynamische Platzhalter können erst nach Abspeichern des Moduls angezeigt werden.', 'core'),
                            'filetype'      => array('image'),
                            'dependency'  => array(
                                'element' => 'type',
                                'value' => array('img')
                            ),
                        ),
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Breite', 'core'),
                            'description'   => __('in px oder %', 'core'),
                            'param_name'    => 'img_width',
                            'edit_field_class' => 'vc_col-xs-4',
                            'dependency'  => array(
                                'element' => 'type',
                                'value' => array('img')
                            ),
                        ),
                        
                        // button
                        array(
                            "type"          => "vc_link",
                            "heading"       => __('Link & Text', 'core'),
                            "param_name"    => "btn_value",
                            'edit_field_class' => 'vc_col-xs-12 dynamic_single_field',
                            'description' => __('Dynamische Platzhalter können erst nach Abspeichern des Moduls angezeigt werden.', 'core'),
                            'dependency'  => array(
                                'element' => 'type',
                                'value' => 'btn',
                            ),
                        ),
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Darstellung', 'core'),
                            "param_name"    => "btn_mode",
                            'edit_field_class' => 'vc_col-xs-4',
                            "value" => array(
                                _x('primärer Button', 'small', 'core') => '_button',
                                _x('sekundärer Button', 'small', 'core') => "_button _sec",
                                _x('alternativer Button', 'small', 'core') => "_button _trd",
                                _x('primärer Link', 'small', 'core') => '_link',
                                _x('sekundärer Link', 'small', 'core') => '_link _sec',
                                _x('individuell überschreiben', 'small', 'core') => "custom",
                            ),
                            'dependency'  => array(
                                'element' => 'type',
                                'value' => 'btn',
                            ),
                        ),
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Breite', 'core'),
                            'description'   => __('in px oder %', 'core'),
                            'param_name'    => 'btn_width',
                            'edit_field_class' => 'vc_col-xs-4',
                            'admin_label' => true,
                            'dependency'  => array(
                                'element' => 'type',
                                'value' => 'btn',
                            ),
                        ),
                        array(
                            'type' => 'dropdown',
                            'heading' => __('Größe', 'core'),
                            'param_name' => 'btn_size',
                            'value' => array(
                                _x('normal', 'small', 'core') => '',
                                _x('groß', 'small', 'core') => '_big',
                                _x('klein', 'small', 'core') => '_small',
                            ),
                            'edit_field_class' => 'vc_col-xs-4',
                            'dependency'  => array(
                                'element' => 'btn_mode',
                                'value' => array('_button', '_button _sec', '_button _trd', 'custom'),
                            ),
                        ),
                    ),
                    helper::custom_element_params_vc('btn_', 'btn_mode', 'custom'),
                    helper::custom_icon_params_vc('btn_', 'type', 'btn'),
                    
                    ( $module === 'normal' ? array() : array(
                        
                        //post values
                        
                        // image
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Breite', 'core'),
                            'description'   => __('in px oder %', 'core'),
                            'param_name'    => 'post_img_width',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('image')
                            ),
                        ),
                        
                        // date
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Datumsformat', 'core'),
                            "param_name"    => "post_date_format",
                            'edit_field_class' => 'vc_col-xs-6',
                            "value" => array(
                                _x('Standardformat', 'small', 'core') => '',
                                _x('TT.MM.JJJJ', 'small', 'core') => 'd.m.Y',
                                _x('TT.MM.JJ', 'small', 'core') => 'd.m.y',
                                _x('TT.MM', 'small', 'core') => 'd.m',
                                _x('Tag TT.MM.JJJJ', 'small', 'core') => 'l d.m.Y',
                                _x('Tag TT.MM.JJ', 'small', 'core') => 'l d.m.y',
                                _x('Tag TT.MM.', 'small', 'core') => 'l d.m',
                                _x('T. Monat JJJJ', 'small', 'core') => 'j. F Y',
                                _x('T. Monat JJ', 'small', 'core') => 'j. F y',
                                _x('T. Monat', 'small', 'core') => 'j. F',
                                _x('Tag T. Monat JJJJ', 'small', 'core') => 'l j. F Y',
                                _x('Tag T. Monat JJ', 'small', 'core') => 'l j. F y',
                                _x('Tag T. Monat', 'small', 'core') => 'l j. F',
                                _x('MM JJJJ', 'small', 'core') => 'm Y',
                                _x('MM JJ', 'small', 'core') => 'm y',
                                _x('MM', 'small', 'core') => 'm',
                                _x('Monat JJJJ', 'small', 'core') => 'F Y',
                                _x('Monat JJ', 'small', 'core') => 'F y',
                                _x('Monat', 'small', 'core') => 'F',
                                _x('JJJJ', 'small', 'core') => 'Y',
                                _x('JJ', 'small', 'core') => 'y',
                                _x('Uhrzeit (h:i)', 'small', 'core') => 'G:i',
                                _x('Uhrzeit mit Sekunden (H:i:s)', 'small', 'core') => 'H:i:s',
                                _x('Stunden', 'small', 'core') => 'G',
                                _x('Minuten', 'small', 'core') => 'm',
                                _x('Sekunden', 'small', 'core') => 's',
                            ),
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('date')
                            ),
                        ),
                        
                        // content
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Zeichenanzahl', 'core'),
                            'description'   => __('„-1“ zeigt den kompletten Inhalt', 'core'),
                            'value'         => '100',
                            'param_name'    => 'post_content_length',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('content')
                            ),
                        ),
                        array(
                            'type'          => 'textfield',
                            'heading'       => __('Breite', 'core'),
                            'description'   => __('in px oder %', 'core'),
                            'param_name'    => 'post_content_width',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('content')
                            ),
                        ),
                        
                        // taxonomies
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Trennelement', 'core'),
                            "param_name"    => "post_tax_seperator",
                            'edit_field_class' => 'vc_col-xs-6',
                            "value" => array(
                                _x('Komma (, )', 'small', 'core') => '',
                                _x('Semikolon (; )', 'small', 'core') => 'semi',
                                _x('vertikaler Strich ( | )', 'small', 'core') => 'vert',
                                _x('horizontaler Strich ( - )', 'small', 'core') => 'hor',
                                _x('Punkt ( • )', 'small', 'core') => 'dot',
                                _x('Leerzeichen ( )', 'small', 'core') => 'space',
                                _x('Zeilenumbruch', 'small', 'core') => 'br',

                            ),
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('category', 'tag', 'taxonomy')
                            ),
                        ),
                        
                        // general
                        array(
                            "type"        => 'new_line',
                            "param_name"  => 'new_line_post_general',
                            'dependency' => array(
                                'element' => 'post_value',
                                'value' => array('title', 'content', 'date', 'author', 'category', 'tag', 'taxonomy', 'site_title')
                            ),
                        ),
                        array(
                            "type"          => "colorselect",
                            "heading"       => __('Schriftfarbe', 'core'),
                            'param_name'  => 'post_color',
                            'edit_field_class' => 'vc_col-xs-6',
                            'dependency' => array(
                                'element' => 'post_value',
                                'value' => array('title', 'content', 'date', 'author', 'category', 'tag', 'taxonomy', 'site_title')
                            ),
                        ),
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Formatierung', 'core'),
                            "param_name"    => "post_format",
                            'edit_field_class' => 'vc_col-xs-6',
                            "value" => array(
                                _x('Standard', 'small', 'core') => 'normal',
                                _x('bold', 'small', 'core') => 'bold',
                                _x('kursiv', 'small', 'core') => 'italic',
                                _x('klein (85%)', 'small', 'core') => 'small',
                                _x('groß (110%)', 'small', 'core') => 'big',
                                _x('maximal (120%)', 'small', 'core') => 'bigger',

                            ),
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('title', 'content', 'date', 'author', 'category', 'tag', 'taxonomy', 'site_title')
                            ),
                        ),
                        
                        // link
                        array(
                            'type' => 'checkbox',
                            'param_name' => 'post_link',
                            'edit_field_class' => 'vc_col-xs-12',
                            'value' => array(
                                __('Beitrag verlinken', 'core') => 'true',
                            ),
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('title', 'content')
                            ),
                        ),
                        array(
                            'type' => 'checkbox',
                            'param_name' => 'post_author_link',
                            'edit_field_class' => 'vc_col-xs-6',
                            'value' => array(
                                __('Autor verlinken', 'core') => 'true',
                            ),
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('author')
                            ),
                        ),
                        array(
                            'type' => 'checkbox',
                            'param_name' => 'post_tax_link',
                            'edit_field_class' => 'vc_col-xs-12',
                            'value' => array(
                                __('Verlinken', 'core') => 'true',
                            ),
                            'dependency'  => array(
                                'element' => 'post_value',
                                'value' => array('category', 'tag', 'taxonomy')
                            ),
                        ),
                    ) )
                )
            )
        );
        
    }
	public function post_layout_params_vc($single="") {
        $single = empty($single) ? __("Beiträge", 'core') : $single;
        
		return array(
            array(
                "type"        => 'seperator',
                "heading"     => sprintf(__('Darstellung der %s', 'core'), $single),
                "param_name"  => 'seperator_post_design',
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('manual')
                ),
            ),
            array(
                "type"        => 'dropdown',
                "heading"     => __('Verlinkung', 'core').' <u>'.__('zum Beitrag', 'core').'</u>',
                "param_name"  => 'post_linkfull',
                'edit_field_class' => 'vc_col-xs-3',
                'value' => array(
                    _x('ja', 'small', 'core') => '',
                    _x('ja (neue Seite)', 'small', 'core') => 'blank',
                    _x('nein', 'small', 'core') => 'no',
                ),
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('manual')
                ),
            ),
            array(
                "type"          => "colorselect",
                "heading"       => __('Hintergrundfarbe', 'core'),
                "param_name"    => "post_background",
                'edit_field_class' => 'vc_col-xs-6',
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('manual')
                ),
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Eckenradius', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'post_border_radius',
                'edit_field_class' => 'vc_col-xs-3',
                'value'         => '0px',
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('manual')
                ),
            ),
            // Layout
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Layout', 'core'),
                "param_name"  => 'sub_seperator_post_design_layout',
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('manual')
                ),
            ),
            array(
                'type' => 'dropdown',
                'heading'   => __('Anordnung', 'core').'<br><u>'.__('der Elemente', 'core').'</u>',
                //'description'   => __('der Postelemente', 'core'),
                'param_name' => 'post_element_layout',
                // 'admin_label' => true,
                'edit_field_class' => 'vc_col-xs-3',
                'value' => array(
                    _x('untereinander', 'small', 'core') => 'vertical',
                    _x('nebeneinander', 'small', 'core') => 'horizontal',
                ),
                'dependency'  => array(
                    'element' => 'post_setup_mode',
                    'value' => array('manual')
                ),
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Ausrichtung', 'core').'<br><u>'.__('der Elemente', 'core').'</u>',
                //'description'   => __('der Postelemente', 'core'),
                'param_name' => 'post_element_align',
                'edit_field_class' => 'vc_col-xs-3',
                'value' => array(
                    _x('oben', 'small', 'core') => 'fs',
                    _x('mittig', 'small', 'core') => 'fc',
                    _x('unten', 'small', 'core') => 'fe',
                ),
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Abstand', 'core').'<br><u>'.__('dazwischen', 'core').'</u>',
                'description'   => __('in px', 'core'),
                'param_name'    => 'post_element_padding',
                'edit_field_class' => 'vc_col-xs-2',
                'value'         => '20px',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Padding', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                'description'   => __('in px', 'core'),
                'param_name'    => 'post_padding_top',
                'edit_field_class' => 'vc_col-xs-2',
                'value'         => '0px',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Padding', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                'description'   => __('in px', 'core'),
                'param_name'    => 'post_padding_right',
                'edit_field_class' => 'vc_col-xs-2',
                'value'         => '0px',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            // Layout
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Rahmen', 'core'),
                "param_name"  => 'sub_seperator_post_design_border',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Stärke', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'post_border_width',
                'edit_field_class' => 'vc_col-xs-3',
                'value'         => '0px',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                "type"          => "colorselect",
                "heading"       => __('Farbe', 'core'),
                "param_name"    => "post_border_color",
                'edit_field_class' => 'vc_col-xs-9',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_before_post_border',
            ),
            array(
                'type'          => 'dropdown',
                'heading'       => __('Rahmen', 'core').' <u>'.__('links', 'core').'</u>',
                'param_name'    => 'post_border_left',
                'value'         => helper::get_border_styles(),
                "std"           => 'none',
                'edit_field_class' => 'vc_col-xs-3',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                'type'          => 'dropdown',
                'heading'       => __('Rahmen', 'core').' <u>'.__('oben', 'core').'</u>',
                'param_name'    => 'post_border_top',
                'value'         => helper::get_border_styles(),
                "std"           => 'none',
                'edit_field_class' => 'vc_col-xs-3',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                'type'          => 'dropdown',
                'heading'       => __('Rahmen', 'core').' <u>'.__('rechts', 'core').'</u>',
                'param_name'    => 'post_border_right',
                'value'         => helper::get_border_styles(),
                "std"           => 'none',
                'edit_field_class' => 'vc_col-xs-3',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),
            array(
                'type'          => 'dropdown',
                'heading'       => __('Rahmen', 'core').' <u>'.__('unten', 'core').'</u>',
                'param_name'    => 'post_border_bottom',
                'value'         => helper::get_border_styles(),
                "std"           => 'none',
                'edit_field_class' => 'vc_col-xs-3',
                'dependency'  => array(
                    'element'   => 'post_element_layout',
                    'not_empty' => true
                ),
            ),

        );
    }
    
	public function posts_pagination_params_vc() {
        $group = __('Pfeile & Paginierung', 'core');
		return array(
            // array(
            //     "type"        => 'seperator',
            //     "heading"     => __('Paginierung', 'core'),
            //     "param_name"  => 'seperator_pagination',
            //     "group"       => $group,
            // ),
            // pagination
            array(
                'type' => 'dropdown',
                'heading' => __('Darstellung', 'core'),
                'param_name' => 'pagination_layout',
                // 'admin_label' => true,
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    _x('Pfeile & Paginierung unten', 'small', 'core') => 'bottom',
                    _x('Pfeile & Paginierung oben', 'small', 'core') => 'top',
                    _x('Pfeile seitlich, Paginierung unten', 'small', 'core') => 'bottom_side', // pagination2
                    _x('Pfeile seitlich, Paginierung oben', 'small', 'core') => 'top_side',     // pagination2
                    _x('nur Pfeile seitlich', 'small', 'core') => 'none_side',                  // pagination2
                    _x('nur Paginierung unten', 'small', 'core') => 'only_bottom',            // pagination2
                    _x('nur Paginierung oben', 'small', 'core') => 'only_top',                // pagination2
                    _x('keine Paginierung oder Pfeile', 'small', 'core') => 'none',
                ),
                "group"       => $group,
                "weight"      => 7
            ),
            
            // classic bottom, top, none
            array(
                "type"          => "dropdown",
                'heading'       => __('Typ', 'core'),
                "param_name"    => "pagination_numbers",
                'edit_field_class' => 'vc_col-xs-4',
                "value" => array(
                    _x('Ziffern (1. 2. ...)', 'small', 'core') => '',
                    _x('Icons (◎, ◉, ...)', 'small', 'core') => 'icons',
                    _x('nur Weiter/Zurück-Icons', 'small', 'core') => 'none',
                    _x('Bilder hochladen', 'small', 'core') => 'custom', // new
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array( // new
                "type"          => "dropdown",
                'heading'       => __('Stil', 'core'),
                "param_name"    => "pagination_numbers_style",
                'edit_field_class' => 'vc_col-xs-4',
                "value" => array(
                    _x('1 2 3 ...', 'small', 'core') => '',
                    _x('1. 2. 3. ...', 'small', 'core') => '1.',
                    _x('01 02 03 ...', 'small', 'core') => '01',
                    _x('01. 02. 03. ...', 'small', 'core') => '01.',
                    _x('A B C ...', 'small', 'core') => 'A',
                    _x('a b c ...', 'small', 'core') => 'a',
                ),
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('')
                ),
                "group"       => $group,
            ),

            // classic layout
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Layout', 'core'),
                "param_name"  => 'seperator_pagination_layout',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Ausrichtung', 'core'),
                'param_name' => 'pagination_pull',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    _x('zentriert', 'small', 'core') => '_center',
                    _x('linksbündig', 'small', 'core') => '_left',
                    _x('rechtsbündig', 'small', 'core') => '_right',
                    _x('auseinander', 'small', 'core') => '_space', // new
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'checkbox',
                'heading'     => __('Inhalt überlappen', 'core'),
                'param_name'  => 'pagination_overlap',
                'edit_field_class' => 'vc_col-xs-8',
                'value' => array(
                    __('Ja', 'core') => 'enable',
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),

            array(
                'type'          => 'textfield',
                // 'heading'       => __('Abstand oben/unten', 'core'),
                'heading'       => __('Abstand', 'core').'<br><u>'.__('darüber', 'core').'</u>',
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination_margin_top',
                'edit_field_class' => 'vc_col-xs-3',
                'value'         => '30px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                // 'heading'       => __('Abstand oben/unten', 'core'),
                'heading'       => __('Padding', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination_padding',
                'edit_field_class' => 'vc_col-xs-3',
                'value'         => '0px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                // 'heading'       => __('Abstand seitlich', 'core'),
                'heading'       => __('Padding', 'core').'<br><u>'.__('der Paginierungen', 'core').'</u>',
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination_numbers_padding',
                'edit_field_class' => 'vc_col-xs-3',
                'value'         => '10px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                // 'heading'       => __('Abstand dazwischen', 'core'),
                'heading'       => __('Padding', 'core').'<br><u>'.__('Weiter/Zurück', 'core').'</u>',
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination_icon_padding',
                'edit_field_class' => 'vc_col-xs-3',
                'value'         => '5px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),

            // classic design
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Gestaltung', 'core'),
                "param_name"  => 'seperator_pagination_design',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'iconpicker',
                'heading'     => __( 'nach links', 'core' ),
                'param_name'  => 'pagination_icon_previous',
                'edit_field_class' => 'vc_col-xs-3',
                'settings'    => array(
                    'emptyIcon'    => false,
                    'type'         => 'elegant',
                    'iconsPerPage' => 4000,
                ),
                'value'       => 'arrow_left',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('', 'icons', 'none')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'iconpicker',
                'heading'     => __( 'Paginierung normal', 'core' ),
                'param_name'  => 'pagination_numbers_icon',
                'edit_field_class' => 'vc_col-xs-3',
                'settings'    => array(
                    'emptyIcon'    => false,
                    'type'         => 'elegant',
                    'iconsPerPage' => 4000,
                ),
                'value'       => 'icon_circle-empty',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('icons')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'iconpicker',
                'heading'     => __( 'Paginierung aktiv', 'core' ),
                'param_name'  => 'pagination_numbers_icon_active',
                'edit_field_class' => 'vc_col-xs-3',
                'settings'    => array(
                    'emptyIcon'    => false,
                    'type'         => 'elegant',
                    'iconsPerPage' => 4000,
                ),
                'value'       => 'icon_circle-slelected',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('icons')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'iconpicker',
                'heading'     => __( 'nach rechts', 'core' ),
                'param_name'  => 'pagination_icon_next',
                'edit_field_class' => 'vc_col-xs-3',
                'settings'    => array(
                    'emptyIcon'    => false,
                    'type'         => 'elegant',
                    'iconsPerPage' => 4000,
                ),
                'value'       => 'arrow_right',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('', 'icons', 'none')
                ),
                "group"       => $group,
            ),
            // custom images
            array( // new
                'type'          => 'file_picker',
                'heading'       => __('Pfeil links', 'core'),
                'param_name'    => 'pagination_img_previous',
                'filetype'      => 'image',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-3',
                "group"       => $group,
            ),
            array( // new
                'type'          => 'file_picker',
                'heading'     => __( 'Paginierung normal', 'core' ),
                'param_name'  => 'pagination_numbers_img',
                'filetype'      => 'image',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-3',
                "group"       => $group,
            ),
            array( // new
                'type'          => 'file_picker',
                'heading'     => __( 'Paginierung aktiv', 'core' ),
                'param_name'  => 'pagination_numbers_img_active',
                'filetype'      => 'image',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-3',
                "group"       => $group,
            ),
            array( // new
                'type'          => 'file_picker',
                'heading'       => __('Pfeil rechts', 'core'),
                'param_name'    => 'pagination_img_next',
                'filetype'      => 'image',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-3',
                "group"       => $group,
            ),

            // classic colors
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_pagination_color',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "colorselect",
                "heading"       => __('Farbe', 'core'),
                'param_name'    => 'pagination_color',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('', 'icons', 'none')
                ),
                "group"       => $group,
            ),
            array( // new
                "type"          => "colorselect",
                "heading"       => __('Hover', 'core'),
                'param_name'    => 'pagination_color_hover',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('', 'icons', 'none')
                ),
                "group"       => $group,
            ),
            array( // new
                "type"          => "colorselect",
                "heading"       => __('Aktiv', 'core'),
                'param_name'    => 'pagination_color_active',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('', 'icons')
                ),
                "group"       => $group,
            ),
            // img opacities
            array( // new
                'type'          => 'range',
                'param_name'    => 'pagination_opacity',
                'input_attrs'   => array( "min" => 0, "max" => 100, "step" => 1 ),
                'label'         => array( "lbl" => __('Deckkraft', 'core').': ', "unit" => "%" ),
                'value'         => '100',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-4',
                "group"       => $group,
            ),
            array( // new
                'type'          => 'range',
                'param_name'    => 'pagination_opacity_hover',
                'input_attrs'   => array( "min" => 0, "max" => 100, "step" => 1 ),
                'label'         => array( "lbl" => __('Hover', 'core').': ', "unit" => "%" ),
                'value'         => '70',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-4',
                "group"       => $group,
            ),
            array( // new
                'type'          => 'range',
                'param_name'    => 'pagination_opacity_active',
                'input_attrs'   => array( "min" => 0, "max" => 100, "step" => 1 ),
                'label'         => array( "lbl" => __('Aktiv', 'core').': ', "unit" => "%" ),
                'value'         => '70',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-4',
                "group"       => $group,
            ),
                
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_pagination_after_color',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom', 'top')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "dropdown",
                "heading"       => __('Schriftgröße', 'core'),
                "param_name"    => "pagination_text_size",
                'edit_field_class' => 'vc_col-xs-4',
                "value" => array(
                    _x('Standard', 'small', 'core') => 'normal',
                    _x('bold', 'small', 'core') => 'bold',
                    _x('minimal (70%)', 'small', 'core') => 'smaller',
                    _x('klein (85%)', 'small', 'core') => 'small',
                    _x('groß (110%)', 'small', 'core') => 'big',
                    _x('größer (120%)', 'small', 'core') => 'bigger',
                    _x('maximal (220%)', 'small', 'core') => 'biggest',
                ),
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('', 'icons', 'none')
                ),
                "group"       => $group,
            ),
            array( // new
                'type'          => 'textfield',
                'heading'       => __('Breite', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination_img_size',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '20px',
                'dependency'  => array(
                    'element' => 'pagination_numbers',
                    'value' => array('custom')
                ),
                "group"       => $group,
            ),
            // mobile
            
        );
    }
    public function posts_pagination2_params_vc() {
        // advanced pagination
        $group = __('Pfeile & Paginierung', 'core');
        return array(
            // arrows
            array(
                "type"        => 'seperator',
                "heading"     => __('Pfeile', 'core'),
                "param_name"  => 'seperator_pagination2_arrows',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "dropdown",
                'heading'       => __('Typ', 'core'),
                "param_name"    => "pagination2_arrows",
                'edit_field_class' => 'vc_col-xs-4',
                "value" => array(
                    _x('Icons (<, ←, →, >, ...)', 'small', 'core') => '',
                    _x('Bilder hochladen', 'small', 'core') => 'custom',
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Layout', 'core'),
                "param_name"  => 'seperator_pagination2_arrows_layout',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Ausrichtung', 'core'),
                'param_name' => 'pagination2_arrows_align',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    _x('mittig', 'small', 'core') => 'middle',
                    _x('oben', 'small', 'core') => 'top',
                    _x('unten', 'small', 'core') => 'bottom',
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'checkbox',
                'heading'     => __('Inhalt überlappen', 'core'),
                'param_name'  => 'pagination2_arrows_overlap',
                'edit_field_class' => 'vc_col-xs-6',
                'value' => array(
                    __('Ja', 'core') => 'enable',
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Abstand oben/unten', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_arrows_padding_tb',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '10px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Abstand seitlich', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_arrows_padding_lr',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '10px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            // arrows design
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Gestaltung', 'core'),
                "param_name"  => 'seperator_pagination2_arrows_design',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'iconpicker',
                'heading'     => __( 'nach links', 'core' ),
                'param_name'  => 'pagination2_arrows_icon_previous',
                'edit_field_class' => 'vc_col-xs-3',
                'settings'    => array(
                    'emptyIcon'    => false,
                    'type'         => 'elegant',
                    'iconsPerPage' => 4000,
                ),
                'value'       => 'arrow_left',
                'dependency'  => array(
                    'element' => 'pagination2_arrows',
                    'value' => array('')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'iconpicker',
                'heading'     => __( 'nach rechts', 'core' ),
                'param_name'  => 'pagination2_arrows_icon_next',
                'edit_field_class' => 'vc_col-xs-3',
                'settings'    => array(
                    'emptyIcon'    => false,
                    'type'         => 'elegant',
                    'iconsPerPage' => 4000,
                ),
                'value'       => 'arrow_right',
                'dependency'  => array(
                    'element' => 'pagination2_arrows',
                    'value' => array('')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'file_picker',
                'heading'       => __('Pfeil links', 'core'),
                'param_name'    => 'pagination2_arrows_img_previous',
                'filetype'      => 'image',
                'dependency'  => array(
                    'element' => 'pagination2_arrows',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-3',
                "group"       => $group,
            ),
            array(
                'type'          => 'file_picker',
                'heading'       => __('Pfeil rechts', 'core'),
                'param_name'    => 'pagination2_arrows_img_next',
                'filetype'      => 'image',
                'dependency'  => array(
                    'element' => 'pagination2_arrows',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-3',
                "group"       => $group,
            ),
            // arrows color
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_pagination2_arrows_color',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "colorselect",
                "heading"       => __('Farbe', 'core'),
                'param_name'    => 'pagination2_arrows_color',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination2_arrows',
                    'value' => array('')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "colorselect",
                "heading"       => __('Hover', 'core'),
                'param_name'    => 'pagination2_arrows_color_hover',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination2_arrows',
                    'value' => array('')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'range',
                'param_name'    => 'pagination2_arrows_opacity',
                'input_attrs'   => array( "min" => 0, "max" => 100, "step" => 1 ),
                'label'         => array( "lbl" => __('Deckkraft', 'core').': ', "unit" => "%" ),
                'value'         => '100',
                'dependency'  => array(
                    'element' => 'pagination2_arrows',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-4',
                "group"       => $group,
            ),
            array(
                'type'          => 'range',
                'param_name'    => 'pagination2_arrows_opacity_hover',
                'input_attrs'   => array( "min" => 0, "max" => 100, "step" => 1 ),
                'label'         => array( "lbl" => __('Hover', 'core').': ', "unit" => "%" ),
                'value'         => '70',
                'dependency'  => array(
                    'element' => 'pagination2_arrows',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-4',
                "group"       => $group,
            ),
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_pagination2_arrows_after_color',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Breite', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_arrows_size',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '40px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            // mobile arrows
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Mobil', 'core'),
                "param_name"  => 'seperator_pagination2_arrows_mobile',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Ausrichtung', 'core'),
                'param_name' => 'pagination2_arrows_align_mobile',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    _x('unverändert', 'small', 'core') => '',
                    _x('mittig', 'small', 'core') => 'middle',
                    _x('oben', 'small', 'core') => 'top',
                    _x('unten', 'small', 'core') => 'bottom',
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Breite', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_arrows_size_mobile',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'none_side')
                ),
                "group"       => $group,
            ),

            //
            // pagination
            array(
                "type"        => 'seperator',
                "heading"     => __('Paginierung', 'core'),
                "param_name"  => 'seperator_pagination2_numbers',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "dropdown",
                'heading'       => __('Typ', 'core'),
                "param_name"    => "pagination2_numbers",
                'edit_field_class' => 'vc_col-xs-4',
                "value" => array(
                    _x('Ziffern (1. 2. ...)', 'small', 'core') => '',
                    _x('Icons (◎, ◉, ...)', 'small', 'core') => 'icons',
                    _x('Bilder hochladen', 'small', 'core') => 'custom',
                    _x('Kreise', 'small', 'core') => 'dots',
                    _x('Quadrate', 'small', 'core') => 'blocks',
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "dropdown",
                'heading'       => __('Stil', 'core'),
                "param_name"    => "pagination2_numbers_style",
                'edit_field_class' => 'vc_col-xs-4',
                "value" => array(
                    _x('1 2 3 ...', 'small', 'core') => '',
                    _x('1. 2. 3. ...', 'small', 'core') => '1.',
                    _x('01 02 03 ...', 'small', 'core') => '01',
                    _x('01. 02. 03. ...', 'small', 'core') => '01.',
                    _x('A B C ...', 'small', 'core') => 'A',
                    _x('a b c ...', 'small', 'core') => 'a',
                ),
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('')
                ),
                "group"       => $group,
            ),
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Layout', 'core'),
                "param_name"  => 'seperator_pagination2_numbers_layout',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Ausrichtung', 'core'),
                'param_name' => 'pagination2_numbers_align',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    _x('zentriert', 'small', 'core') => '_center',
                    _x('linksbündig', 'small', 'core') => '_left',
                    _x('rechtsbündig', 'small', 'core') => '_right',
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'checkbox',
                'heading'     => __('Inhalt überlappen', 'core'),
                'param_name'  => 'pagination2_numbers_overlap',
                'edit_field_class' => 'vc_col-xs-6',
                'value' => array(
                    __('Ja', 'core') => 'enable',
                ),
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Abstand oben/unten', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_numbers_padding_tb',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '10px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Abstand seitlich', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_numbers_padding_lr',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            // numbers design
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Gestaltung', 'core'),
                "param_name"  => 'seperator_pagination2_numbers_design',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'iconpicker',
                'heading'     => __( 'Paginierung normal', 'core' ),
                'param_name'  => 'pagination2_numbers_icon',
                'edit_field_class' => 'vc_col-xs-3',
                'settings'    => array(
                    'emptyIcon'    => false,
                    'type'         => 'elegant',
                    'iconsPerPage' => 4000,
                ),
                'value'       => 'icon_circle-empty',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('icons')
                ),
                "group"       => $group,
            ),
            array(
                'type'        => 'iconpicker',
                'heading'     => __( 'Paginierung aktiv', 'core' ),
                'param_name'  => 'pagination2_numbers_icon_active',
                'edit_field_class' => 'vc_col-xs-3',
                'settings'    => array(
                    'emptyIcon'    => false,
                    'type'         => 'elegant',
                    'iconsPerPage' => 4000,
                ),
                'value'       => 'icon_circle-slelected',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('icons')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'file_picker',
                'heading'     => __( 'Paginierung normal', 'core' ),
                'param_name'  => 'pagination2_numbers_img',
                'filetype'      => 'image',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-3',
                "group"       => $group,
            ),
            array(
                'type'          => 'file_picker',
                'heading'     => __( 'Paginierung aktiv', 'core' ),
                'param_name'  => 'pagination2_numbers_img_active',
                'filetype'      => 'image',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-3',
                "group"       => $group,
            ),
            // numbers color
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_pagination2_numbers_color',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "colorselect",
                "heading"       => __('Farbe', 'core'),
                'param_name'    => 'pagination2_numbers_color',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('', 'icons', 'dots', 'blocks')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "colorselect",
                "heading"       => __('Hover', 'core'),
                'param_name'    => 'pagination2_numbers_color_hover',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('', 'icons', 'dots', 'blocks')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "colorselect",
                "heading"       => __('Aktiv', 'core'),
                'param_name'    => 'pagination2_numbers_color_active',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('', 'icons', 'dots', 'blocks')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'range',
                'param_name'    => 'pagination2_numbers_opacity',
                'input_attrs'   => array( "min" => 0, "max" => 100, "step" => 1 ),
                'label'         => array( "lbl" => __('Deckkraft', 'core').': ', "unit" => "%" ),
                'value'         => '100',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-4',
                "group"       => $group,
            ),
            array(
                'type'          => 'range',
                'param_name'    => 'pagination2_numbers_opacity_hover',
                'input_attrs'   => array( "min" => 0, "max" => 100, "step" => 1 ),
                'label'         => array( "lbl" => __('Hover', 'core').': ', "unit" => "%" ),
                'value'         => '70',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-4',
                "group"       => $group,
            ),
            array(
                'type'          => 'range',
                'param_name'    => 'pagination2_numbers_opacity_active',
                'input_attrs'   => array( "min" => 0, "max" => 100, "step" => 1 ),
                'label'         => array( "lbl" => __('Aktiv', 'core').': ', "unit" => "%" ),
                'value'         => '70',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('custom')
                ),
                'edit_field_class' => 'vc_col-xs-4',
                "group"       => $group,
            ),
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_pagination2_numbers_after_color',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                "type"          => "textfield",
                "heading"       => __('Schriftgröße', 'core'),
                'description'   => __('in px oder em', 'core').' ('.sprintf(__('Standard: %s', 'core'), '1em').')',
                "param_name"    => "pagination2_numbers_text_size",
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('', 'icons')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Breite', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_numbers_img_size',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '20px',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('custom', 'dots', 'blocks')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Abstand dazwischen', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_numbers_space',
                'edit_field_class' => 'vc_col-xs-4',
                'value'         => '10px',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            // numbers mobile
            array(
                "type"        => 'sub_seperator',
                "heading"     => __('Mobil', 'core'),
                "param_name"  => 'seperator_pagination2_numbers_mobile',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Breite', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_numbers_img_size_mobile',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'pagination2_numbers',
                    'value' => array('custom', 'dots', 'blocks')
                ),
                "group"       => $group,
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Abstand dazwischen', 'core'),
                'description'   => __('in px', 'core'),
                'param_name'    => 'pagination2_numbers_space_mobile',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element'   => 'pagination_layout',
                    'value'     => array('bottom_side', 'top_side', 'only_top', 'only_bottom')
                ),
                "group"       => $group,
            ),

        );
    }

    /**
     * Advanced Search Features
     */
    public function posts_sorting_params_vc($group='', $pre="", $dependency=[], $is_template=false, $template_type="") {
        $group = empty($group) ? __('Erweitert', 'core') : $group;


        $postviews_custom_param = false;
        $relevance_custom_param = false;

        // default wordings for 
        $sorting_options = array(
            _x('chronologisch (Neueste zuerst)', 'small', 'core') => '', // ==> 'date DESC' (wordpress default)
            _x('chronologisch (Älteste zuerst)', 'small', 'core') => 'date ASC',
            _x('alphabetisch (aufsteigend)', 'small', 'core') => 'title ASC',
            _x('alphabetisch (absteigend)', 'small', 'core') => 'title DESC',
        );

        // get advanced search settings
        $settings = \basics::get_setting(array('site', 'advanced_search'));
        
        // is post counter enabled?
        if ($settings['postviews_counter'] === 'true') {
            $sorting_options[_x('meist gelesen', 'small', 'core')] = 'views DESC';
            $postviews_custom_param = array(
                'type'        => 'textfield',
                'group'       => $group,
                'heading'     => __('Meist gelesen', 'core'),
                'param_name'  => $pre.'text_views_desc',
                'edit_field_class' => 'vc_col-xs-6',
                'dependency'  => array(
                    'element' => $pre.'dropdown_frontend',
                    'value' => 'show',
                )
            );
        }
        
        // is this a search template and relevance is enabled?
        if ($settings['relevance'] === 'true' && $is_template && $template_type === "search") {
            $sorting_options[_x('Relevanz', 'small', 'core')] = 'relevance DESC';
            $relevance_custom_param = array(
                'type'        => 'textfield',
                'group'       => $group,
                'heading'     => __('Relevanz', 'core'),
                'param_name'  => $pre.'text_relevance_desc',
                'edit_field_class' => 'vc_col-xs-6',
                'dependency'  => array(
                    'element' => $pre.'dropdown_frontend',
                    'value' => 'show',
                )
            );
        }

        // sorting
        $initial_sorting = array(
            array(
                'type'        => 'seperator',
                'heading'     => __('Sortierung', 'core'),
                'param_name'  => $pre.'seperator',
                'group'       => $group,
                "weight"      => 9
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Initiale Sortierung', 'core'),
                'description' => $is_template ? __('Diese Sortierung greift nur, wenn keine Sortierung durch den Nutzer gesetzt wurde.', 'core') : '',
                'param_name' => $pre.'mode_initial',
                'admin_label' => true,
                'edit_field_class' => 'vc_col-xs-6',
                'value'       => $sorting_options,
                'group'       => $group,
            ),
        );

        return array_merge(
            $initial_sorting,
            array(
                array(
                    "type"        => 'new_line',
                    "param_name"  => $pre.'new_line_after_mode',
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Sortierung Frontend (Dropdown)', 'core'),
                    'param_name'  => $pre.'dropdown_frontend',
                    //'edit_field_class' => 'vc_col-xs-6',
                    'value' => array(
                        __('aktivieren', 'core') => 'show',
                    ),
                    'dependency'  => $dependency,
                    'group'       => $group,
                ),
                array(
                    'type' => 'info_text',
                    'text' => __( 'Das Sortierungs-Dropdown funktioniert nicht mit Tabellen. Tabellen haben ihre eigene eingebaute Sortierfunktion.', 'core' ),
                    'param_name' => 'info_after'.$pre."_dropdown",
                    'styling' => 'info',
                    'edit_field_class' => 'vc_col-xs-8',
                    'dependency'  => array(
                        'element'   => 'posts_layout',
                        'value'     => 'table'
                    ),
                    'group'       => $group,
                ),
                array(
                    "type"        => 'new_line',
                    "param_name"  => $pre.'new_line_after_checkbox',
                    'group'       => $group,
                ),
                array(
                    'type'        => 'dropdown',
                    'heading'     => __('Dropdown Position', 'core'),
                    'param_name'  => $pre.'position',
                    'edit_field_class' => 'vc_col-xs-3',
                    'value' => array(
                        _x('Links oben', 'small', 'core') => 'flex-start top',
                        _x('Rechts oben', 'small', 'core') => 'flex-end top',
                        _x('Links unten', 'small', 'core') => 'flex-start bottom',
                        _x('Rechts unten', 'small', 'core') => 'flex-end bottom',
                    ),
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Darstellung', 'core'),
                    "param_name"    => $pre."style",
                    'edit_field_class' => 'vc_col-xs-3 vc_clearleft',
                    "value" => array(
                        _x('primäres Feld', 'small', 'core') => '_input',
                        _x('sekundäres Feld', 'small', 'core') => "_input _sec",
                        _x('individuell überschreiben', 'small', 'core') => "custom",
                    ),
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,    
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Breite', 'core'),
                    'description'   => __('in px oder %', 'core'),
                    'param_name'    => $pre.'width',
                    'edit_field_class' => 'vc_col-xs-2',
                    'admin_label' => true,
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core').' <u>'.__('darüber', 'core').'</u>',
                    'description'   => __('in px', 'core'),
                    'param_name'    => $pre.'margin_top',
                    'edit_field_class' => 'vc_col-xs-2',
                    'value'         => '30px',
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    "group"         => $group,
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core').' <u>'.__('darunter', 'core').'</u>',
                    'description'   => __('in px', 'core'),
                    'param_name'    => $pre.'margin_bottom',
                    'edit_field_class' => 'vc_col-xs-2',
                    'value'         => '30px',
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    "group"         => $group,
                ),
                array(
                    "type"        => 'new_line',
                    "param_name"  => $pre.'new_line_after_margin',
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,
                ),
            ),
            helper::custom_element_params_vc($pre, $pre.'style', 'custom', $group),
            array(
                array(
                    "type"        => 'sub_seperator',
                    "heading"     => __('Individuelle Bezeichnungen', 'core'),
                    'description' => __('Gib hier individuelle Namen für die Sortierungsoptionen ein', 'core'),
                    "param_name"  => $pre."_individual_names",
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('chronologisch (Neueste zuerst)', 'core'),
                    'param_name'  => $pre.'text_date_desc',
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('chronologisch (Älteste zuerst)', 'core'),
                    'param_name'  => $pre.'text_date_asc',
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('alphabetisch (aufsteigend)', 'core'),
                    'param_name'  => $pre.'text_title_asc',
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,
                ),
                array(
                    'type'        => 'textfield',
                    'heading'     => __('alphabetisch (absteigend)', 'core'),
                    'param_name'  => $pre.'text_title_desc',
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => $pre.'dropdown_frontend',
                        'value' => 'show',
                    ),
                    'group'       => $group,
                ),
            ),
            $postviews_custom_param ? array( $postviews_custom_param ) : array(),
            $relevance_custom_param ? array( $relevance_custom_param ) : array()
        );
    }
    public function load_more_button($group='', $pre="") {
        return array_merge(
            array(
                array(
                    'type'          => 'seperator',
                    'heading'       => __('„Mehr laden“-Button', 'core'),
                    'param_name'    => $pre.'seperator',
                    'group'         => $group,
                ),
                array(
                    'type'          => 'textfield',
                    'group'         => $group,
                    'heading'       => __('Text', 'core'),
                    'description'   => __('Standard: mehr laden', 'core'),
                    'param_name'    => $pre.'text',
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label' => true
                ),
                array(
                    'type'          => 'textfield',
                    'group'         => $group,
                    'heading'       => __('Breite', 'core'),
                    'description'   => __('in px oder %', 'core'),
                    'param_name'    => $pre.'width',
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label' => true
                ),
                array(
                    'type'          => 'dropdown',
                    'group'         => $group,
                    'heading'       => __('Größe', 'core'),
                    'param_name'    => $pre.'size',
                    'value' => array(
                        _x('normal', 'small', 'core') => '',
                        _x('groß', 'small', 'core') => '_big',
                        _x('klein', 'small', 'core') => '_small',
                    ),
                    'edit_field_class' => 'vc_col-xs-4'
                ),
                array(
                    "type"          => 'new_line',
                    'group'         => $group,
                    "param_name"    => $pre.'new_line_before_style'
                ),
                array(
                    "type"          => "dropdown",
                    'group'         => $group,
                    "heading"       => __('Darstellung', 'core'),
                    "param_name"    => $pre."style",
                    'edit_field_class' => 'vc_col-xs-4',
                    "value" => array(
                        _x('primärer Button', 'small', 'core') => '_button',
                        _x('sekundärer Button', 'small', 'core') => "_button _sec",
                        _x('alternativer Button', 'small', 'core') => "_button _trd",
                        _x('primärer Link', 'small', 'core') => '_link',
                        _x('sekundärer Link', 'small', 'core') => '_link _sec',
                        // _x('individuell überschreiben', 'small', 'core') => "custom",
                    )
                ),
            ),
            // helper::custom_element_params_vc($pre, $pre."style", "custom", $group),
            helper::custom_icon_params_vc($pre, false, false, $group)
        );
    }
    public function live_search_labels($group='', $pre="") {
        return array(
            array(
                'type'        => 'seperator',
                'heading'     => __('Hinweismeldung wenn keine Ergebnisse gefunden wurden', 'core'),
                'param_name'  => $pre.'seperator',
                'group'       => $group,
            ),
            array(
                'type'        => 'textfield',
                'group'       => $group,
                'heading'     => __('Text', 'core'),
                'description' => sprintf(__('Standard: %s', 'core'), __('Es konnten leider keine Suchergebnisse gefunden werden.', 'core')),
                'param_name'  => $pre.'no_result',
                'edit_field_class' => 'vc_col-xs-4',
                'admin_label' => true
            ),
       );
    }
    
    /* new search */
    public function search_vc() {
        vc_map(array(
            "name"          => __('Suche', 'core'),
            "description"   => __('Konfigurierbares Suchfeld', 'core'),
            "base"          => "vc_search",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/search.svg",
            "params"        => array_merge(array(
                array(
                    "type"        => 'sub_seperator',
                    "heading"     => __('Allgemein', 'core'),
                    "param_name"  => 'seperator_display',
                ),
                array(
                    'type' => 'dropdown',
                    'heading' => __('Darstellung', 'core'),
                    'param_name' => 'display',
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'value' => array(
                        _x('simpel (nur Suchfeld)', 'small', 'core') => 'normal',
                        _x('nebeneinander', 'small', 'core') => 'horizontal',
                        _x('untereinander', 'small', 'core') => 'vertical',
                        _x('individuell', 'small', 'core') => 'custom',
                    ),
                    'description'   => __('Wie sollen Eingabefeld, Button und optionale Filter angeordnet werden?', 'core'),
                ),
                array(
                    'type' => 'dropdown',
                    'heading' => __('Suche eingrenzen', 'core'),
                    'param_name' => 'filter',
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'value' => array(),
                    // 'group' => __( 'Voreinstellungen', 'core' ),
                    'description'   => __('Es wird nur der eingestellte Post Type durchsucht.', 'core'),
                ),
                
                // simples Suchfeld
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Suchfeld einstellen', 'core'),
                    "param_name"  => 'seperator_simple',
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('normal'),
                    ),
                ),
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_placeholder',
                    'heading'       => __( 'Typ', 'core' ),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'textfield',
                        'field' => 'simple_field_placeholder',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('normal'),
                    ),
                ),
            ),
            $this->search_input_field( 'simple_field_', array(
                'element' => 'display',
                'value' => array('normal'),
            ) ),
            array(
                
                // Layout
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Layout', 'core'),
                    "param_name"  => 'seperator_layout',
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('horizontal', 'custom'),
                    ),
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand dazwischen', 'core'),
                    'description'   => __('in px', 'core'),
                    'param_name'    => 'gap',
                    'value'         => '10px',
                    'edit_field_class' => 'vc_col-xs-4',
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('horizontal', 'vertical', 'custom'),
                    ),
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Felder strecken?', 'core'),
                    'param_name'  => 'stretch',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value' => array(
                        _x('gleiche Höhe', 'small', 'core') => 'height',
                        _x('Breite ausdehnen', 'small', 'core') => 'width',
                    ),
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('horizontal', 'custom'),
                    ),
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Innere Ecken', 'core'),
                    'param_name'  => 'ignore_radius',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value' => array(
                        _x('nicht abrunden', 'small', 'core') => 'ignore',
                    ),
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('horizontal'),
                    ),
                ),
                array(
                    "type"        => 'sub_seperator',
                    "heading"     => __('Mobil', 'core'),
                    "param_name"  => 'seperator_mobile',
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('horizontal', 'custom'),
                    ),
                ),
                array(
                    'type' => 'dropdown',
                    'heading' => __('Umbrechen ab:', 'core'),
                    'param_name' => 'breakpoint',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value' => array(
                        _x('mobil (bei 480px)', 'small', 'core') => 'xs',
                        _x('kleines Tablet (bei 767px)', 'small', 'core') => 'sm',
                        _x('Tablet (bei 1024px)', 'small', 'core') => 'md',
                        _x('nicht umbrechen', 'small', 'core') => 'none',
                    ),
                    'description'   => __('Ab welchem Breakpoint sollen alle Felder untereinander dargestellt werden?', 'core'),
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('horizontal', 'custom'),
                    ),
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand dazwischen', 'core'),
                    'description'   => __('in px', 'core'),
                    'param_name'    => 'gap_mobile',
                    'value'         => '6px',
                    'edit_field_class' => 'vc_col-xs-4',
                    'dependency'  => array(
                        'element' => 'breakpoint',
                        'value' => array('xs', 'sm', 'md'),
                    ),
                ),

                // Felder
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Felder einstellen', 'core'),
                    "param_name"  => 'seperator_fields',
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('horizontal', 'vertical', 'custom'),
                    ),
                ),
                array(
                    'type'        => 'param_group',
                    'heading'     => '',
                    'param_name'  => 'fields',
                    'dependency'  => array(
                        'element' => 'display',
                        'value' => array('horizontal', 'vertical', 'custom'),
                    ),
                    'params'      => array_merge(
                        array(
                            array(
                                'type' => 'dropdown',
                                'heading' => __('Art des Feldes', 'core'),
                                'param_name' => 'type',
                                'admin_label' => true,
                                'value' => array(
                                    _x('Eingabefeld', 'small', 'core') => 'input',
                                    _x('Filter (Dropdown)', 'small', 'core') => 'filter',
                                    _x('Button', 'small', 'core') => '_button',
                                    _x('Zeilenumbruch', 'small', 'core') => 'br',
                                    _x('dynamischer Leerbereich', 'small', 'core') => 'space',
                                ),
                                'edit_field_class' => 'vc_col-xs-12',
                            )
                        ),
                        $this->search_input_field( 'input_', array(
                            'element' => 'type',
                            'value' => array('input'),
                        ), array(
                            'hide_align' => true
                        ) ),
                        $this->search_dropdown_field( 'filter_', array(
                            'element' => 'type',
                            'value' => array('filter'),
                        ) ),
                        $this->search_button_field( 'button_', array(
                            'element' => 'type',
                            'value' => array('_button'),
                        ) ),
                        array(
                            array(
                                'type'          => 'info_text',
                                'text'          => __( 'Füllt automatisch die restliche verfügbare Breite', 'core' ),
                                'param_name'    => 'info_space',
                                'styling'       => 'info',
                                'edit_field_class' => 'vc_col-xs-6',
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => array('space'),
                                )
                            )
                        )
                    )
                )
            ), 
            $this->autofill_dropdown(),
            helper::custom_element_params_vc('autofill_', 'autofill_style', 'custom', __('Autofill', 'core')))
        ));
    }
    public function search_input_field($pre="", $dependency=[], $args=[]) {
        return array_merge(
            array(
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Platzhalter', 'core'),
                    'description' => __('Standard: Suche', 'core'),
                    'param_name'  => $pre.'placeholder',
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label' => true,
                    'dependency'  => $dependency
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Breite', 'core'),
                    'description'   => __('in px oder %', 'core'),
                    'param_name'    => $pre.'width',
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label' => true,
                    'dependency'  => $dependency
                ),
            ),
            ( isset($args['hide_align']) && $args['hide_align'] ? array() :
                array(array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => $pre."align",
                    'edit_field_class' => 'vc_col-xs-4',
                    "value"         => array(
                        _x('linksbündig', 'small', 'core') => 'flex-start',
                        _x('zentriert', 'small', 'core') => 'center',
                        _x('rechtsbündig', 'small', 'core') => 'flex-end',
                    ),
                    'dependency'  => $dependency
                ))
            ),
            array(
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Darstellung', 'core'),
                    "param_name"    => $pre."style",
                    'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                    "value" => array(
                        _x('primäres Feld', 'small', 'core') => '_input',
                        _x('sekundäres Feld', 'small', 'core') => "_input _sec",
                        _x('individuell überschreiben', 'small', 'core') => "custom",
                    ),
                    'dependency'  => $dependency
                ),
            ),
            helper::custom_element_params_vc($pre, $pre.'style', 'custom'),
            array(
                array(
                    "type"        => 'sub_seperator',
                    "heading"     => __('Icon', 'core'),
                    "param_name"  => $pre.'seperator_icon',
                    'dependency'  => $dependency
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Position', 'core'),
                    "param_name"    => $pre."icon_position",
                    'edit_field_class' => 'vc_col-xs-4',
                    "value" => array(
                        _x('links', 'small', 'core') => 'left',
                        _x('rechts', 'small', 'core') => "right",
                        _x('nicht anzeigen', 'small', 'core') => "none",
                    ),
                    'dependency'  => $dependency
                ),
                array(
                    'type'        => 'iconpicker',
                    'heading'     => __( 'Icon auswählen', 'core' ),
                    'param_name'  => $pre.'icon',
                    'edit_field_class' => 'vc_col-xs-6',
                    'settings'    => array(
                        'emptyIcon'    => false,
                        'type'         => 'elegant',
                        'iconsPerPage' => 4000,
                    ),
                    'value'       => 'icon_search',
                    'dependency'  => array(
                        'element' => $pre.'icon_position',
                        'value' => array('left', 'right'),
                    )
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand zum Text', 'core'),
                    'description'   => __('in px oder em', 'core'),
                    'param_name'    => $pre.'icon_margin',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value'         => '10px',
                    'dependency'  => array(
                        'element' => $pre.'icon_position',
                        'value' => array('left', 'right'),
                    ),
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Größe', 'core'),
                    'description'   => __('in %', 'core'),
                    'param_name'    => $pre.'icon_size',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value'         => '100%',
                    'dependency'  => array(
                        'element' => $pre.'icon_position',
                        'value' => array('left', 'right'),
                    ),
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Icon als Auslöser?', 'core'),
                    'description' => __('Bei Klick auf das Icon, wird die Suche gestartet.', 'core'),
                    'param_name'  => $pre.'icon_submit',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value' => array(
                        __('Ja', 'core') => 'submit',
                    ),
                    'dependency'  => array(
                        'element' => $pre.'icon_position',
                        'value' => array('left', 'right'),
                    ),
                )
            )
        );
    }

    public function autofill_dropdown() {

        $sorting_options = array(
            _x('Relevanz', 'small', 'core') => '',
            _x('alphabetisch (aufsteigend)', 'small', 'core') => 'title ASC',
        );

        // Check if Post Views Counter is enabled and enable or disable the most read sorting option
        $settings = \basics::get_setting(array('site', 'advanced_search'));

        if ( $settings['postviews_counter'] === 'true' ) {
            $sorting_options[_x('meist gelesen', 'small', 'core')] = 'views DESC';
        }
        if ( $settings['relevance'] === 'true' ) {
            $sorting_options[_x('Relevanz', 'small', 'core')] = 'relevance DESC';
        }

        return array(
            array(
                "type"        => 'seperator',
                "heading"     => __('Auto Search', 'core'),
                "param_name"  => 'seperator_autofill',
                'group'        => __('Auto Search', 'core'),
            ),
            array(
                'type'        => 'checkbox',
                'heading'     => __('Auto Search', 'core'),
                'param_name'  => 'autofill',
                'edit_field_class' => 'vc_col-xs-2',
                'value' => array(
                    __('aktivieren', 'core') => 'show',
                ),
                'group'       => __('Auto Search', 'core'),
            ),
            array(
                'type'      => 'range',
                'input_attrs'   => array( "min" => 3, "max" => 25, "step" => 1 ),
                'heading'   => __('Anzahl Suchergebnisse', 'core'),
                'edit_field_class' => 'vc_col-xs-4',
                "param_name"    => "autofill_max_results",
                'value'     => '5',
                'dependency'  => array(
                    'element' => 'autofill',
                    'value'   => 'show'
                ),
                'group'       => __('Auto Search', 'core'),
            ),
            array(
                "type"        => 'new_line',
                "param_name"  => 'new_line_after_autofill_show',
                'dependency'  => array(
                    'element' => 'autofill',
                    'value'   => 'show'
                ),
                'group'       => __('Auto Search', 'core'),
            ),
            array(
                "type"          => "dropdown",
                "heading"       => __('Darstellung', 'core'),
                "param_name"    => "autofill_style",
                'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                "value" => array(
                    _x('wie Suchfeld', 'small', 'core') => 'as_searchfield',
                    _x('primäres Feld', 'small', 'core') => '_input',
                    _x('sekundäres Feld', 'small', 'core') => "_input _sec",
                    _x('individuell überschreiben', 'small', 'core') => "custom",
                ),
                'dependency'  => array(
                    'element' => 'autofill',
                    'value'   => 'show'
                ),
                'group'       => __('Auto Search', 'core'),  
            ),
            array(
                'type' => 'dropdown',
                'heading' => __('Sortierung', 'core'),
                'param_name' => 'autofill_sorting',
                'edit_field_class' => 'vc_col-xs-4',
                'value'       => $sorting_options,
                'dependency'  => array(
                    'element' => 'autofill',
                    'value'   => 'show'
                ),
                'group'       => __('Auto Search', 'core'),
            ),

            array(
                'type'        => 'textfield',
                'heading'     => __('Text Ladeanzeige', 'core'),
                'description' => __('Standard: lädt...', 'core'),
                'param_name'  => 'autofill_loading',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'autofill',
                    'value'   => 'show'
                ),
                'group'       => __('Auto Search', 'core'),
            ),
            array(
                'type'        => 'textfield',
                'heading'     => __('Text: kein Ergebnis', 'core'),
                'description' => __('Standard: keine Ergebnisse gefunden', 'core'),
                'param_name'  => 'autofill_noresult',
                'edit_field_class' => 'vc_col-xs-4',
                'dependency'  => array(
                    'element' => 'autofill',
                    'value'   => 'show'
                ),
                'group'       => __('Auto Search', 'core'),
            ),
            // array(
            //     'type'        => 'checkbox',
            //     'heading'     => __('Zeige Auto Search bei Klick ins Suchfeld', 'core'),
            //     'param_name'  => 'autofill_show_on_click',
            //     'edit_field_class' => 'vc_col-xs-4',
            //     'value' => array(
            //         __('aktivieren', 'core') => 'true',
            //     ),
            //     'dependency'  => array(
            //         'element' => 'autofill',
            //         'value'   => 'show'
            //     ),
            //     'group'       => __('Auto Search', 'core'),
            // ),
            // array(
            //     'type'        => 'checkbox',
            //     'heading'     => __('Content durchsuchen', 'core'),
            //     'description' => __('Wenn du diese Option aktivierst, wird nicht nur der Titel, sondern auch der Content durchsucht.', 'core'),
            //     'param_name'  => 'autofill_search_title_only',
            //     'edit_field_class' => 'vc_col-xs-4',
            //     'value' => array(
            //         __('aktivieren', 'core') => 'false',
            //     ),
            //     'dependency'  => array(
            //         'element' => 'autofill',
            //         'value'   => 'show'
            //     ),
            //     'group'       => __('Auto Search', 'core'),
            // ),
            array(
                'type'        => 'checkbox',
                'heading'     => __('Bei Klick auf das Ergebnis direkt zum Post weiterleiten', 'core'),
                'param_name'  => 'autofill_forward_on_click',
                'edit_field_class' => 'vc_col-xs-4',
                'value' => array(
                    __('aktivieren', 'core') => 'true',
                ),
                'dependency'  => array(
                    'element' => 'autofill',
                    'value'   => 'show'
                ),
                'group'       => __('Auto Search', 'core'),
            ),
        );
    }

    public $filter_fields = [];
    public function search_dropdown_field($pre="", $dependency=[], $args=[]) {
        
        $filter_fields = $this->filter_fields;
        
        if ( count($filter_fields) === 0 ) {
            $all_taxs = array(
                'all' => array( 
                    _x('Post Type', 'small', 'core') => 'post_type',
                    // _x('Kategorie', 'small', 'core') => 'category',
                    // _x('Schlagwort', 'small', 'core') => 'tag',
                )
            );
            $posttypes = helper::get_all_posttypes();
            foreach( $posttypes as $posttype ) {
                if ( $posttype->slug === 'attachement' ) continue;
                $taxonomies = get_object_taxonomies( $posttype->slug , 'objects');
                if ( is_array($taxonomies) && count($taxonomies) > 0 ) {
                    $tax = [];
                    foreach ($taxonomies as $taxonomy) {
                        if ( $taxonomy->name !== 'post_format' ) $tax[$taxonomy->label] = $taxonomy->name;
                    }
                    $all_taxs[$posttype->slug] = $tax;
                }
            }
            foreach ( $all_taxs as $type => $taxs ) {
                $options = $type === 'all' ? $taxs : array_merge( array( _x('bitte wählen', 'small', 'core') => '' ), $taxs );
                $filter_fields[] = array(
                    'type' => 'dropdown',
                    'heading' => __('Filtern nach', 'core'),
                    'param_name' => $pre.'type_'.$type,
                    'value' => $options,
                    'edit_field_class' => 'vc_col-xs-4 hidden',
                    // 'description'   => "+++ filter == $type +++",
                    'dependency'  => $dependency
                );
            }
        }
        
        return array_merge(
            $filter_fields,
            array(
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Platzhalter', 'core'),
                    'param_name'  => $pre.'placeholder',
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label' => true,
                    'dependency'  => $dependency
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Breite', 'core'),
                    'description'   => __('in px oder %', 'core'),
                    'param_name'    => $pre.'width',
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label' => true,
                    'dependency'  => $dependency
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Darstellung', 'core'),
                    "param_name"    => $pre."style",
                    'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                    "value" => array(
                        _x('primäres Feld', 'small', 'core') => '_input',
                        _x('sekundäres Feld', 'small', 'core') => "_input _sec",
                        _x('individuell überschreiben', 'small', 'core') => "custom",
                    ),
                    'dependency'  => $dependency
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Mehrfachauswahl möglich', 'core'),
                    'param_name'  => $pre.'multiselect',
                    'edit_field_class' => 'vc_col-xs-4',
                    'value' => array(
                        __('Ja', 'core') => 'multiselect',
                    ),
                    'dependency'  => $dependency
                ),
            ),
            helper::custom_element_params_vc($pre, $pre.'style', 'custom')
        );
    }
    public function search_button_field($pre="", $dependency=[], $args=[]) {
        return array_merge(
            array(
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Text', 'core'),
                    'description' => __('Standard: suchen', 'core'),
                    'param_name'  => $pre.'text',
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label' => true,
                    'dependency'  => $dependency
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Breite', 'core'),
                    'description'   => __('in px oder %', 'core'),
                    'param_name'    => $pre.'width',
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label' => true,
                    'dependency'  => $dependency
                ),
                array(
                    'type' => 'dropdown',
                    'heading' => __('Größe', 'core'),
                    'param_name' => $pre.'size',
                    'value' => array(
                        _x('normal', 'small', 'core') => '',
                        _x('groß', 'small', 'core') => '_big',
                        _x('klein', 'small', 'core') => '_small',
                    ),
                    'edit_field_class' => 'vc_col-xs-4',
                    'dependency'  => $dependency
                ),
                array(
                    "type"        => 'new_line',
                    "param_name"  => $pre.'new_line_before_style',
                    'dependency'  => $dependency
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Darstellung', 'core'),
                    "param_name"    => $pre."style",
                    'edit_field_class' => 'vc_col-xs-4',
                    "value" => array(
                        _x('primärer Button', 'small', 'core') => '_button',
                        _x('sekundärer Button', 'small', 'core') => "_button _sec",
                        _x('alternativer Button', 'small', 'core') => "_button _trd",
                        _x('individuell überschreiben', 'small', 'core') => "custom",
                    ),
                    'dependency'  => $dependency
                ),
            ),
            helper::custom_element_params_vc($pre, $pre.'style', 'custom'),
            helper::custom_icon_params_vc($pre, $dependency['element'], $dependency['value'])
        );
    }


    /* extra menüs */
    public function extranav_vc() {
        vc_map(array(
            "name"          => __('Menü', 'core'),
            "description"   => __('Einbindung eines Wordpress-Menüs, z.B. im Footer', 'core'),
            "base"          => "vc_footernav",
            // "category"      => __("Template", 'core'),
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/menu.svg",
            "params"        => array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Menü', 'core'),
                    "param_name"  => 'seperator_main',
                ),
                // dynamic menu
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_menu',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'dropdown_menu',
                        'field' => 'menu',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Anzuzeigendes Menü', 'core'),
                    'description'   => __('Welches Menü soll angezeigt werden?', 'core'),
                    "param_name"    => "menu",
                    'admin_label'   => true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'value' => array_merge(helper::get_vc_menus(), array( _x('Individuelles Menü', 'small', 'core') => 'custom' ))
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Schriftgröße', 'core'),
                    "param_name"    => "text_size",
                    'edit_field_class' => 'vc_col-xs-4',
                    'admin_label'   => true,
                    "value" => array(
                        _x('Standard (100%)', 'small', 'core') => 'normal',
                        // _x('Bold (100%)', 'small', 'core') => 'bold',
                        _x('minimal (70%)', 'small', 'core') => 'smaller',
                        _x('klein (85%)', 'small', 'core') => 'small',
                        _x('groß (110%)', 'small', 'core') => 'big',
                        _x('größer (120%)', 'small', 'core') => 'bigger',
                        // _x('Biggest (220%)', 'core') => 'biggest',
                    ),
                ),
                // custom menü
                array(
                    'type'        => 'param_group',
                    'heading'     => __('Individuelles Menü', 'core'),
                    'param_name'  => 'custom_menu',
                    'params'      => array(
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Level', 'core'),
                            "param_name"    => "menu_link_level",
                            'edit_field_class' => 'vc_col-xs-3',
                            'admin_label'   => true,
                            "value"         => array(
                                _x('Hauptebene', 'small', 'core') => 1,
                                _x('Subebene', 'small', 'core') => 2,
                            ),
                        ),
                        array(
                            "type"          => "vc_link",
                            "heading"       => __('Menü Link', 'core'),
                            "param_name"    => "menu_link",
                            'edit_field_class' => 'vc_col-xs-9',
                            'admin_label'   => true,
                        ),
                    ),
                    'dependency'  => array(
                        'element' => 'menu',
                        'value' => array('custom'),
                    ),
                ),

                array(
                    "type"        => 'seperator',
                    "heading"     => __('Layout', 'core'),
                    "param_name"  => 'seperator_layout',
                ),
                // layout

                array(
                    "type"        => 'sub_seperator',
                    "heading"       => __('auf Desktop-Geräten', 'core'),
                    "description"   => __('ab 1025px', 'core'),
                    "param_name"  => 'sub_seperator_xl',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Anordnung', 'core'),
                    "param_name"    => "direction",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('nebeneinander', 'small', 'core') => 'menu_row',
                        _x('nebeneinander (rückwärts)', 'small', 'core') => 'menu_row-reverse',
                        _x('untereinander', 'small', 'core') => 'menu_column',
                        _x('untereinander (rückwärts)', 'small', 'core') => 'menu_column-reverse',
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "justify",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => 'menu_row_center',
                        _x('linksbündig', 'small', 'core') => 'menu_row_flex-start',
                        _x('rechtsbündig', 'small', 'core') => 'menu_row_flex-end',
                        _x('verteilen (Abstand außen)', 'small', 'core') => 'menu_row_space-around',
                        _x('verteilen (Abstand dazwischen)', 'small', 'core') => 'menu_row_space-between',
                    ),
                    'dependency'  => array(
                        'element' => 'direction',
                        'value' => array('menu_row', 'menu_row-reverse'),
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "align",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => 'menu_column_center',
                        _x('linksbündig', 'small', 'core') => 'menu_column_flex-start',
                        _x('rechtsbündig', 'small', 'core') => 'menu_column_flex-end',
                    ),
                    'dependency'  => array(
                        'element' => 'direction',
                        'value' => array('menu_column', 'menu_column-reverse'),
                    ),
                ),

                array(
                    "type"        => 'sub_seperator',
                    "heading"       => __('auf Tablets', 'core'),
                    "description"   => __('768 bis 1024px', 'core'),
                    "param_name"  => 'sub_seperator_lg',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Anordnung', 'core'),
                    "param_name"    => "direction_lg",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('nebeneinander', 'small', 'core') => 'menu_lg_row',
                        _x('nebeneinander (rückwärts)', 'small', 'core') => 'menu_lg_row-reverse',
                        _x('untereinander', 'small', 'core') => 'menu_lg_column',
                        _x('untereinander (rückwärts)', 'small', 'core') => 'menu_lg_column-reverse',
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "justify_lg",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => 'menu_lg_row_center',
                        _x('linksbündig', 'small', 'core') => 'menu_lg_row_flex-start',
                        _x('rechtsbündig', 'small', 'core') => 'menu_lg_row_flex-end',
                        _x('verteilen (Abstand außen)', 'small', 'core') => 'menu_lg_row_space-around',
                        _x('verteilen (Abstand dazwischen)', 'small', 'core') => 'menu_lg_row_space-between',
                    ),
                    'dependency'  => array(
                        'element' => 'direction_lg',
                        'value' => array('menu_lg_row', 'menu_lg_row-reverse'),
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "align_lg",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => 'menu_lg_column_center',
                        _x('linksbündig', 'small', 'core') => 'menu_lg_column_flex-start',
                        _x('rechtsbündig', 'small', 'core') => 'menu_lg_column_flex-end',
                    ),
                    'dependency'  => array(
                        'element' => 'direction_lg',
                        'value' => array('menu_lg_column', 'menu_lg_column-reverse'),
                    ),
                ),

                array(
                    "type"        => 'sub_seperator',
                    "heading"       => __('auf kleinen Tablets', 'core'),
                    "description"   => __('481 bis 767px', 'core'),
                    "param_name"  => 'sub_seperator_md',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Anordnung', 'core'),
                    "param_name"    => "direction_md",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('nebeneinander', 'small', 'core') => 'menu_md_row',
                        _x('nebeneinander (rückwärts)', 'small', 'core') => 'menu_md_row-reverse',
                        _x('untereinander', 'small', 'core') => 'menu_md_column',
                        _x('untereinander (rückwärts)', 'small', 'core') => 'menu_md_column-reverse',
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "justify_md",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => 'menu_md_row_center',
                        _x('linksbündig', 'small', 'core') => 'menu_md_row_flex-start',
                        _x('rechtsbündig', 'small', 'core') => 'menu_md_row_flex-end',
                        _x('verteilen (Abstand außen)', 'small', 'core') => 'menu_md_row_space-around',
                        _x('verteilen (Abstand dazwischen)', 'small', 'core') => 'menu_md_row_space-between',
                    ),
                    'dependency'  => array(
                        'element' => 'direction_md',
                        'value' => array('menu_md_row', 'menu_md_row-reverse'),
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "align_md",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => 'menu_md_column_center',
                        _x('linksbündig', 'small', 'core') => 'menu_md_column_flex-start',
                        _x('rechtsbündig', 'small', 'core') => 'menu_md_column_flex-end',
                    ),
                    'dependency'  => array(
                        'element' => 'direction_md',
                        'value' => array('menu_md_column', 'menu_md_column-reverse'),
                    ),
                ),

                array(
                    "type"        => 'sub_seperator',
                    "heading"       => __('auf Mobilgeräten', 'core'),
                    "description"   => __('bis 480px', 'core'),
                    "param_name"  => 'sub_seperator_sm',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Anordnung', 'core'),
                    "param_name"    => "direction_sm",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('nebeneinander', 'small', 'core') => 'menu_sm_row',
                        _x('nebeneinander (rückwärts)', 'small', 'core') => 'menu_sm_row-reverse',
                        _x('untereinander', 'small', 'core') => 'menu_sm_column',
                        _x('untereinander (rückwärts)', 'small', 'core') => 'menu_sm_column-reverse',
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "justify_sm",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => 'menu_sm_row_center',
                        _x('linksbündig', 'small', 'core') => 'menu_sm_row_flex-start',
                        _x('rechtsbündig', 'small', 'core') => 'menu_sm_row_flex-end',
                        _x('verteilen (Abstand außen)', 'small', 'core') => 'menu_sm_row_space-around',
                        _x('verteilen (Abstand dazwischen)', 'small', 'core') => 'menu_sm_row_space-between',
                    ),
                    'dependency'  => array(
                        'element' => 'direction_sm',
                        'value' => array('menu_sm_row', 'menu_sm_row-reverse'),
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "align_sm",
                    'edit_field_class' => 'vc_col-xs-6',
                    // 'admin_label'   => true,
                    "value" => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('zentriert', 'small', 'core') => 'menu_sm_column_center',
                        _x('linksbündig', 'small', 'core') => 'menu_sm_column_flex-start',
                        _x('rechtsbündig', 'small', 'core') => 'menu_sm_column_flex-end',
                    ),
                    'dependency'  => array(
                        'element' => 'direction_sm',
                        'value' => array('menu_sm_column', 'menu_sm_column-reverse'),
                    ),
                ),
                // css
                array(
                    'type' => 'css_editor',
                    'heading' => __( 'CSS', 'core' ),
                    'param_name' => 'css',
                    'group' => __( 'Designeinstellungen', 'core' ),
                )
                
            )
        ));
    }
    public function dropdownnav_vc() {
        vc_map(array(
            "name"          => __('Dropdown Menü', 'core'),
            "description"   => __('Wordpress-Menü als Dropdown', 'core'),
            "base"          => "vc_dropdownnav",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/dropdown.svg",
            "params"        => array_merge(array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Menü', 'core'),
                    "param_name"  => 'seperator_main',
                ),
                // dynamic menu
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_menu',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'dropdown_menu',
                        'field' => 'menu',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Anzuzeigendes Menü', 'core'),
                    'description'   => __('Welches Menü soll angezeigt werden?','core'),
                    "param_name"    => "menu",
                    'admin_label'   => true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'value' => array_merge(helper::get_vc_menus(), array( __('Individuelles Menü', 'core') => 'custom' ))
                ),
                // custom menü
                array(
                    'type'        => 'param_group',
                    'heading'     => __('Individuelles Menü', 'core'),
                    'param_name'  => 'custom_menu',
                    'params'      => array(
                        array(
                            "type"          => "dropdown",
                            "heading"       => __('Level', 'core'),
                            "param_name"    => "menu_link_level",
                            'edit_field_class' => 'vc_col-xs-3',
                            'admin_label'   => true,
                            "value"         => array(
                                _x('Hauptebene', 'small', 'core') => 1,
                                _x('Subebene', 'small', 'core') => 2,
                            ),
                        ),
                        array(
                            "type"          => "vc_link",
                            "heading"       => __('Menü-Link', 'core'),
                            "param_name"    => "menu_link",
                            'edit_field_class' => 'vc_col-xs-9',
                            'admin_label'   => true,
                        ),
                    ),
                    'dependency'  => array(
                        'element' => 'menu',
                        'value' => array('custom'),
                    ),
                ),

                array(
                    "type"        => 'seperator',
                    "heading"     => __('Layout', 'core'),
                    "param_name"  => 'seperator_layout',
                ),
                // layout
                array(
                    'type' => 'dropdown',
                    'heading'   => __('Anordnung', 'core'),
                    'description' => __('Anordnung der Elemente „Dropdown“ und „Button“.', 'core'),
                    'param_name' => 'layout',
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'value' => array(
                        _x('horizontal', 'small', 'core') => 'horizontal',
                        _x('vertikal', 'small', 'core') => 'vertical',
                    ),
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Responsive', 'core'),
                    'description'       => __('Vertikaler Umbruch ab 768px.', 'core'),
                    'param_name'  => 'responsive',
                    'edit_field_class' => 'vc_col-xs-3',
                    'value' => array(
                        __('Ja', 'core') => 'responsive',
                    ),
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core'),
                    'description'       => __('Abstand zwischen den Elementen. (Einheit: in px)', 'core'),
                    'param_name'    => 'fields_padding',
                    'value'         => '10px',
                    'edit_field_class' => 'vc_col-xs-3',
                ),

                array(
                    "type"        => 'seperator',
                    "heading"     => __('Auswahlfeld', 'core'),
                    "param_name"  => 'sub_seperator_dropdown',
                ),
                // dropdown
                array(
                    'type'        => 'textfield',
                    'heading'     => __('Platzhalter', 'core'),
                    'description'       => __('Platzhaltertext im Auswahlfeld.', 'core'),
                    'param_name'  => 'dropdown_holder',
                    'edit_field_class' => 'vc_col-xs-6',
                ),
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Breite', 'core'),
                    'description'       => __('in px oder %', 'core'),
                    'param_name'    => 'dropdown_width',
                    'value'         => '100%',
                    'edit_field_class' => 'vc_col-xs-3',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "dropdown_align",
                    'edit_field_class' => 'vc_col-xs-3',
                    "value"         => array(
                        _x('linksbündig/oben', 'small', 'core') => 'start',
                        _x('zentriert', 'small', 'core') => 'center',
                        _x('rechtsbündig/unten', 'small', 'core') => "end",
                    ),
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Darstellung', 'core'),
                    'description'       => __('Wie soll das Auswahlfeld aussehen?', 'core'),
                    "param_name"    => "dropdown_style",
                    'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                    "value" => array(
                        _x('primäres Dropdown', 'small', 'core') => '_dropdown',
                        _x('sekundäres Dropdown', 'small', 'core') => "_dropdown _sec",
                        _x('individuell überschreiben', 'small', 'core') => "custom",
                    ),
                ),
            ),
            // custom dropdown
            helper::custom_element_params_vc('dropdown_', 'dropdown_style', 'custom'),

            array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Button', 'core'),
                    "param_name"  => 'sub_seperator_btn',
                ),
                // submit button
                array(
                    'type'        => 'textarea',
                    'heading'     => __('Text', 'core'),
                    'description'       => __('Welcher Text soll auf dem Button stehen?', 'core'),
                    'param_name'  => 'btn',
                    'edit_field_class' => 'vc_col-xs-6',
                    'admin_label' => true,
                ), 
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Breite', 'core'),
                    'description'       => __('in px oder %', 'core'),
                    'param_name'    => 'btn_width',
                    'value'         => '100%',
                    'edit_field_class' => 'vc_col-xs-3',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Ausrichtung', 'core'),
                    "param_name"    => "btn_align",
                    'edit_field_class' => 'vc_col-xs-3',
                    "value"         => array(
                        _x('linksbündig/oben', 'small', 'core') => 'start',
                        _x('zentriert', 'small', 'core') => 'center',
                        _x('rechtsbündig/unten', 'small', 'core') => "end",
                    ),
                ),
            ),
            array(
                // button style
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Darstellung', 'core'),
                    'description'       => __('Wie soll der Button aussehen?', 'core'),
                    "param_name"    => "btn_style",
                    'edit_field_class' => 'vc_col-xs-4 vc_clearleft',
                    "value" => array(
                        _x('primärer Link', 'small', 'core') => '_link',
                        _x('sekundärer Link', 'small', 'core') => '_link _sec',
                        _x('primärer Button', 'small', 'core') => '_button',
                        _x('sekundärer Button', 'small', 'core') => "_button _sec",
                        _x('alternativer Button', 'small', 'core') => "_button _trd",
                        _x('individuell überschreiben', 'small', 'core') => "custom",
                    ),
                ), 
            ),
            // custom button
            helper::custom_element_params_vc('btn_', 'btn_style', 'custom') ,
                                           
            // Icon
            helper::custom_icon_params_vc('btn_')
            
            )
        ));
    }

    /* copyright */
    public function copyright_vc() {
        vc_map(array(
            "name"          => __('Copyright', 'core'),
            "description"   => __('Copyright mit Text, häufig im Footer', 'core'),
            "base"          => "vc_copyright",
            "category"      => __("Template", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/copyright.svg",
            "params"        => array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Darstellung', 'core'),
                    "param_name"  => 'seperator_copyright',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Layout', 'core'),
                    "param_name"    => "layout",
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'value' => array(
                        _x('bitte auswählen', 'small', 'core') => '',
                        _x('Icon links, Text rechts', 'small', 'core') => "right",
                        _x('Text links, Icon rechts', 'small', 'core') => 'left',
                        _x('Text zentriert, kein Icon', 'small', 'core') => "center",
                        _x('Icon zentriert, kein Text', 'small', 'core') => "center2",
                    ),
                ),
                array(
                    "type"        => 'new_line',
                    "param_name"  => 'new_line_before_text',
                ),
                array(
                    'type'        => 'textarea',
                    'heading'     => __('Copyright Text', 'core'),
                    "description" => __("Wenn du folgende Platzhalter eingibst, werden diese Informationen generiert: <br/> _c_: Copyright-Zeichen <br/> _year_: Jahreszahl <br/> _name_: Name der Homepage", 'core'),
                    'param_name'  => 'text',
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-9',
                    'dependency'  => array(
                        'element' => 'layout',
                        'value' => array('left', 'right', 'center'),
                    ),
                    'value'       => '_c_ _year_ _name_',
                ),
                array(
                    'type'        => 'attach_image',
                    'heading'     => __('Icon', 'core'),
                    "description"   => __('Bild auswählen.', 'core'),
                    'param_name'  => 'img',
                    'admin_label' => true,
                    'edit_field_class' => 'vc_col-xs-6',
                    'dependency'  => array(
                        'element' => 'layout',
                        'value' => array('left', 'right', 'center2'),
                    ),
                ),
                array(
                    "type"        => "checkbox",
                    "heading"     => __("Elemente nicht verlinken", 'core'),
                    "param_name"  => 'no_link',
                    'dependency'  => array(
                        'element' => 'layout',
                        'value' => array('left', 'right', 'center', 'center2'),
                    ),
                ),
            )
        ));
    }

    /* content_box */
    public function content_box_vc() {
        $group = __('Gestaltung', 'core');
        $pre = 'vc_content_box';
        vc_map(array(
            "name"          => __('Content Box', 'core'),
            "description"   => __('Box mit beliebigen Inhalten', 'core'),
            "base"          => $pre,
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/content_box.svg",
            "as_parent"     => array( 'except' => $pre.', vc_tta_section, vc_section, vc_list_item' ),
            "js_view"       => 'VcCbView',
            "params"        => array_merge(array(
                    array(
                        "type"        => 'sub_seperator',
                        "heading"     => __('Event', 'core'),
                        "param_name"  => 'seperator_'.$pre,
                    ),

                    // modus
                    array(
                        "type"          => "dropdown",
                        "heading"       => __('Art des Events', 'core'),
                        "param_name"    => $pre."_event_type",
                        "value"         => array(
                            _x('Link', 'small', 'core') => '',
                            // _x('Download Button', 'small', 'core') => 'download',
                            // _x('Email Button', 'small', 'core') => "email",
                            // _x('Zurück Button', 'small', 'core') => "back",
                            // _x('Scroll-To Button', 'small', 'core') => "down",
                            // _x('Content Wrapper Button', 'small', 'core') => "cwb",
                            // _x('Pop-up schließen', 'small', 'core') => "popup_close",
                            _x('Pop-up öffnen', 'small', 'core') => "popup_open",
                            _x('Trigger', 'small', 'core') => "greyd_trigger",
                            _x('kein Event', 'small', 'core') => "none",
                        ),
                        'edit_field_class' => 'vc_col-xs-4',
                    ),
                    
                    // dynamic link
                    array(
                        'type'          => 'dynamic',
                        'param_name'    => "dynamic_".$pre."_link",
                        'heading'       => __( 'Typ', 'core' ),
                        'text'          => __('Indem du den Link in Templates dynamisch machst, kannst du diesen beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Links verwenden.', 'core'),
                        'value'         => 'static',
                        'params'        => array(
                            'type' => 'vc_link',
                            'field' => $pre."_link",
                        ),
                        'edit_field_class' => 'vc_col-xs-12',
                        'dependency'  => array(
                            'element' => $pre.'_event_type',
                            'value' => array('')
                        ),
                    ),
                    array(
                        "type"          => "vc_link",
                        "heading"       => __('Link wählen', 'core'),
                        "param_name"    => $pre."_link",
                        'edit_field_class' => 'vc_col-xs-12',
                        'dependency'  => array(
                            'element' => $pre.'_event_type',
                            'value' => array('')
                        ),
                    ),

                    // popup
                    array(
                        "type"          => "select",
                        "heading"       => __('Pop-up', 'core'),
                        "param_name"    => $pre."_popup",
                        "options"         => helper::get_vc_posts('greyd_popup', true),
                        'edit_field_class' => 'vc_col-xs-6',
                        'dependency'  => array(
                            'element' => $pre.'_event_type',
                            'value' => 'popup_open',
                        ),
                    ),
                ),

                $this->trigger_options_vc($pre."_", array(
                    'element' => $pre.'_event_type',
                    'value' => array('greyd_trigger')
                )),

                // spacing + responsive
                array(
                    array(
                        "type"        => 'seperator',
                        "heading"     => __('Layout', 'core'),
                        "param_name"  => 'seperator_'.$pre."_spacing",
                    ),
                    array(
                        'type' => 'info_text',
                        'text' => __( 'Das Layout dieses Moduls ist „Mobile First“ aufgebaut. Das heißt, die Werte für die mobile Ansicht werden als Standards definiert und können für größere Bildschirme individuell überschrieben werden.', 'core' ),
                        'param_name' => $pre.'info_mobile_first',
                        'styling' => 'info',
                        'edit_field_class' => 'vc_col-xs-12',
                    ),
                    
                    // mobile
                    array(
                        "type"        => 'sub_seperator',
                        "heading"     => '<u>'.__('Mobilgeräte', 'core').' ('.__('Standard', 'core').' - '.__('bis 480px', 'core').')</u>',
                        "param_name"  => 'sub_seperator_'.$pre."_spacing_mobile",
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Mindesthöhe', 'core').'<br><u>&nbsp;</u>',
                        'description'   => __('in px', 'core'),
                        'param_name'    => $pre.'_height_sm',
                        'edit_field_class' => 'vc_col-xs-3',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Padding', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                        'description'   => __('in px', 'core'),
                        'param_name'    => $pre.'_padding_top_sm',
                        // 'value'         => '5px',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Padding', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                        'description'   => __('in px', 'core'),
                        'param_name'    => $pre.'_padding_right_sm',
                        // 'value'         => '10px',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Abstand', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                        'description'   => __('in px', 'core'),
                        'param_name'    => $pre.'_margin_top_sm',
                        // 'value'         => '5px',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Abstand', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                        'description'   => __('in px', 'core'),
                        'param_name'    => $pre.'_margin_right_sm',
                        // 'value'         => '10px',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    
                    // tablet
                    array(
                        "type"        => 'sub_seperator',
                        "heading"     => '<u>'.__('Kleine Tablets', 'core').' ('.__('481 bis 767px', 'core').')</u>',
                        "param_name"  => 'sub_seperator_'.$pre."_spacing_tablet",
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Mindesthöhe', 'core').'<br><u>&nbsp;</u>',
                        'param_name'    => $pre.'_height_md',
                        'edit_field_class' => 'vc_col-xs-3',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Padding', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                        'param_name'    => $pre.'_padding_top_md',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Padding', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                        'param_name'    => $pre.'_padding_right_md',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Abstand', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                        'param_name'    => $pre.'_margin_top_md',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Abstand', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                        'param_name'    => $pre.'_margin_right_md',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    
                    // big tablet
                    array(
                        "type"        => 'sub_seperator',
                        "heading"     => '<u>'.__('Tablets', 'core').' ('.__('768 bis 1024px', 'core').')</u>',
                        "param_name"  => 'sub_seperator_'.$pre."_spacing_tablet_big",
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Mindesthöhe', 'core').'<br><u>&nbsp;</u>',
                        'param_name'    => $pre.'_height_lg',
                        'edit_field_class' => 'vc_col-xs-3',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Padding', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                        'param_name'    => $pre.'_padding_top_lg',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Padding', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                        'param_name'    => $pre.'_padding_right_lg',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Abstand', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                        'param_name'    => $pre.'_margin_top_lg',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Abstand', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                        'param_name'    => $pre.'_margin_right_lg',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    
                    // desktop
                    array(
                        "type"        => 'sub_seperator',
                        "heading"     => '<u>'.__('Desktop-Geräte', 'core').' ('.__('ab 1025px', 'core').')</u>',
                        "param_name"  => 'sub_seperator_'.$pre."_spacing_desktop",
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Mindesthöhe', 'core').'<br><u>&nbsp;</u>',
                        'param_name'    => $pre.'_height_xl',
                        'edit_field_class' => 'vc_col-xs-3',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Padding', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                        'param_name'    => $pre.'_padding_top_xl',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Padding', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                        'param_name'    => $pre.'_padding_right_xl',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Abstand', 'core').'<br><u>'.__('oben/unten', 'core').'</u>',
                        'param_name'    => $pre.'_margin_top_xl',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('Abstand', 'core').'<br><u>'.__('seitlich', 'core').'</u>',
                        'param_name'    => $pre.'_margin_right_xl',
                        'edit_field_class' => 'vc_col-xs-2',
                    ),
                ),
                
                // Erweitert
                array(
                    array(
                        "type"        => 'seperator',
                        "heading"     => __('Erweitert', 'core'),
                        "param_name"  => 'seperator_'.$pre."_more",
                    ),
                    // extra class
                    array(
                        'type'          => 'textfield',
                        'heading'       => __('CSS Klasse', 'core'),
                        'description'   => __('Gestalte dieses Element individuell - vergebe einen Klassennamen und beziehe dich in deinem CSS darauf (Hinweis: Eingabe ohne Punkt oder Raute davor).', 'core'),
                        'param_name'    => $pre.'_class',
                        'edit_field_class' => 'vc_col-xs-6',
                    ),
                    /**
                     * Flexbox justify content.
                     * @since 1.0.9
                     */
                    array(
                        'type'          => 'dropdown',
                        'heading'       => __('Ausrichtung der Inhalte', 'core'),
                        'description'   => __('Diese Einstellung wirkt sich nur aus, wenn du eine Mindesthöhe setzt, oder in einer übergeordneten Zeile die Option „Inhalte auf gleiche Höhe strecken“ aktivierst.', 'core'),
                        'param_name'    => $pre.'_flex_justify_content',
                        'edit_field_class' => 'vc_col-xs-6',
                        'value'         => array(
                            _x('Standard', 'small', 'core') => '',
                            _x('zentriert', 'small', 'core') => 'center',
                            _x('verteilen (Abstand dazwischen)', 'small', 'core') => 'space-between',
                            _x('verteilen (Abstand außen)', 'small', 'core') => 'space-around',
                            _x('oben', 'small', 'core') => 'flex-start',
                            _x('unten', 'small', 'core') => 'flex-end',
                        ),
                    ),
                ),
                
                // DESIGN
                array(
                    array(
                        "group"         => $group,
                        "type"        => 'seperator',
                        "heading"     => __('Allgemein', 'core'),
                        "param_name"  => 'seperator_'.$pre.'_text',
                    ),
                    array(
                        "group"         => $group,
                        "type"          => "colorselect",
                        "heading"       => __('Textfarbe', 'core'),
                        "param_name"    => $pre."_text_colorselect",
                        'edit_field_class' => 'vc_col-xs-6',
                    ),
                    array(
                        "group"         => $group,
                        "type"          => "colorselect",
                        "heading"       => __('Textfarbe', 'core').' <u>'.__('Hover', 'core').'</u>',
                        "param_name"    => $pre."_text_colorselect_hover",
                        'edit_field_class' => 'vc_col-xs-6',
                    ),
                    array(
                        "group"         => $group,
                        'type'          => 'textfield',
                        'heading'       => __('Eckenradius', 'core'),
                        'description'   => __('in px', 'core'),
                        'param_name'    => $pre.'_border_radius',
                        "value"         => '0px',
                        'edit_field_class' => 'vc_col-xs-3',
                    ),
                    array(
                        "group"         => $group,
                        'type'          => 'textfield',
                        'heading'       => __('Eckenradius', 'core').' <u>'.__('Hover', 'core').'</u>',
                        'description'   => __('in px', 'core'),
                        'param_name'    => $pre.'_border_radius_hover',
                        "value"         => '0px',
                        'edit_field_class' => 'vc_col-xs-3',
                    ),
                ),

                // background
                array(
                    array(
                        "group"         => $group,
                        "type"        => 'seperator',
                        "heading"     => __('Hintergrund', 'core'),
                        "param_name"  => 'seperator_'.$pre.'_type',
                    ),
                ),
                helper::background_params_vc($pre, $group, array(
                    'color' => true,
                    'gradient2' => true,
                    'image' => true,
                    'animation' => true,
                    'video' => false,
                ), true),
                
                // border
                array(
                    array(
                        "group"         => $group,
                        "type"        => 'seperator',
                        "heading"     => __('Rahmen', 'core'),
                        "param_name"  => 'seperator_'.$pre.'_border',
                    ),
                    array(
                        "group"         => $group,
                        "type"        => "checkbox",
                        "heading"     => __("Rahmen aktivieren", 'core'),
                        "param_name"  => $pre."_border",
                    ),
                ),
                helper::border_params_vc($pre, $group, true, $pre."_border", 'not_empty'),
                
                // Dropshadow
                array(
                    array(
                        "group"         => $group,
                        "type"        => 'seperator',
                        "heading"     => __('Schlagschatten', 'core'),
                        "param_name"  => 'seperator_'.$pre.'_sdw',
                    ),
                    array(
                        "group"         => $group,
                        "type"        => "checkbox",
                        "heading"     => __("Schatten aktivieren", 'core'),
                        "param_name"  => $pre."_sdw",
                    ),
                ),
                helper::shadow_params_vc($pre, $group, true, $pre."_sdw", 'not_empty'),
                
                // hover effect
                array(
                    array(
                        "group"         => $group,
                        "type"        => 'seperator',
                        "heading"     => __('Hover Effekt', 'core'),
                        "param_name"  => 'seperator_'.$pre.'_hover',
                    ),
                    array(
                        "group"         => $group,
                        'type'          => 'textfield',
                        'heading'       => __('Dauer', 'core'),
                        'description'   => __('in s', 'core'),
                        'param_name'    => $pre.'_transition_duration',
                        'value'         => '0.3s',
                        'edit_field_class' => 'vc_col-xs-3',
                    ),
                    array(
                        "group"         => $group,
                        'type'          => 'dropdown',
                        'heading'       => __('Animation', 'core'),
                        'param_name'    => $pre.'_transition_effect',
                        'edit_field_class' => 'vc_col-xs-6',
                        'value'         => array(
                            _x('weich (ease)', 'small', 'core') => '', 
                            _x('hart (linear)', 'small', 'core') => 'linear', 
                            _x('Anfang abgeschwächt (ease-in)', 'small', 'core') => 'ease-in', 
                            _x('Ende abgeschwächt (ease-out)', 'small', 'core') => 'ease-out', 
                            _x('Anfang & Ende abgeschwächt (ease-in-out)', 'small', 'core') => 'ease-in-out',
                        ),
                    ),
                ),
                \vc\helper::trigger_action_params_vc()
            )
        ));
    }

    /* list */
    public function list_vc() {
        // item
        vc_map(array(
            "name"          => __('Listenelement', 'core'),
            "base"          => "vc_list_item",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/list_item.svg",
            "as_child"      => array( 'only' => 'vc_list' ),
            "params"        => array(
                // dynamic text
                array(
                    'type'          => 'dynamic',
                    'param_name'    => 'dynamic_content',
                    'heading'       => __( 'Typ', 'core' ),
                    'text'          => __('Indem du Inhalte von Modulen in Templates dynamisch machst, kannst du diese beim späteren Einbinden in eine Seite befüllen. Dadurch kannst du das Template an verschiedenen Stellen mit unterschiedlichen Inhalten verwenden.', 'core'),
                    'value'         => 'static',
                    'params'        => array(
                        'type' => 'textarea_html',
                        'field' => 'content',
                    ),
                    'edit_field_class' => 'vc_col-xs-12',
                    "weight"        => 1,
                ),
                array(
                    'type'        => 'textarea_html',
                    'heading'     => '',
                    // 'heading'     => __('Text', 'core'),
                    'param_name'  => 'content',
                    'edit_field_class' => 'vc_col-xs-12',
                    'admin_label' => true,
                ),
    
            )
        ));
        // list
        vc_map(array(
            "name"          => __('Liste', 'core'),
            "description"   => __('Auflistung mit Bulletpoints', 'core'),
            "base"          => "vc_list",
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/list.svg",
            "as_parent"     => array( 'only' => 'vc_list_item' ),
            "js_view"       => 'VcColumnView',
            "default_content" => "[vc_list_item]".__('erster Listenpunkt','core')."[/vc_list_item][vc_list_item]".__('zweiter Listenpunkt','core')."[/vc_list_item]",
            "params"        => array_merge(array(
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Listenpunkte', 'core'),
                    "param_name"  => 'seperator_icon',
                ),
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Darstellung', 'core'),
                    "param_name"    => "vc_list_type",
                    "value"         => array(
                        _x('nur Absätze', 'small', 'core') => "",
                        _x('Web-Standards (Bulletpoints & Nummerierungen)', 'small', 'core') => 'web',
                        _x('Icon', 'small', 'core') => 'icon',
                        _x('Bild', 'small', 'core') => 'img',
                    ),
                    'edit_field_class' => 'vc_col-xs-6',
                    'admin_label'   => true,
                ),
                // webtypes
                array(
                    "type"          => "dropdown",
                    "heading"       => __('Stil', 'core'),
                    "param_name"    => "vc_list_web",
                    "value"         => array(
                        _x('• gefüllter Kreis', 'small', 'core') => 'disc',
                        _x('◦ offener Kreis', 'small', 'core') => 'circle',
                        _x('▪ gefülltes Quadrat', 'small', 'core') => 'square',
                        _x('numerisch (1. 2. ...)', 'small', 'core') => 'decimal',
                        _x('numerisch mit Null (01. 02. ...)', 'small', 'core') => 'decimal-leading-zero',
                        _x('römisch klein (i. ii. ...)', 'small', 'core') => 'lower-roman',
                        _x('römisch groß (I. II. ...)', 'small', 'core') => 'upper-roman',
                        _x('griechisch klein (α. β. ...)', 'small', 'core') => 'lower-greek',
                        // _x('lateinisch klein (a. b. ...)', 'small', 'core') => 'lower-latin',
                        // _x('lateinisch groß (A. B. ...)', 'small', 'core') => 'upper-latin',
                        _x('armenisch (Ա. Բ. ...)', 'small', 'core') => 'armenian',
                        _x('georgisch (ა. ბ. ...)', 'small', 'core') => 'georgian',
                        _x('alphabetisch klein (a. b. ...)', 'small', 'core') => 'lower-alpha',
                        _x('alphabetisch groß (A. B. ...)', 'small', 'core') => 'upper-alpha',
                        _x('keine Hervorhebung', 'small', 'core') => ' none',
                    ),
                    'dependency'  => array(
                        'element' => 'vc_list_type',
                        'value' => array('web'),
                    ),
                    'edit_field_class' => 'vc_col-xs-6',
                ),
                // icon
                array(
                    'type'        => 'iconpicker',
                    'heading'     => __( 'Icon', 'core' ),
                    // 'description' => __( 'Select from Elegant Icons library.', 'core' ),
                    'param_name'  => 'vc_list_icon',
                    'settings'    => array(
                        'emptyIcon'    => true,
                        'type'         => 'elegant',
                        'iconsPerPage' => 4000,
                    ),
                    'dependency'  => array(
                        'element' => 'vc_list_type',
                        'value' => array('icon'),
                    ),
                    'edit_field_class' => 'vc_col-xs-6',
                ),
                // bild
                array(
                    'type'          => 'file_picker',
                    'heading'       => __( 'Bild', 'core' ),
                    'param_name'    => 'vc_list_image',
                    'filetype'      => 'image',
                    'dependency'  => array(
                        'element' => 'vc_list_type',
                        'value' => array('img'),
                    ),
                    'edit_field_class' => 'vc_col-xs-6',
                ),

                array(
                    "type"        => 'new_line',
                    "param_name"  => 'new_line_list_color',
                ),
                // color
                array(
                    "type"          => "colorselect",
                    "heading"       => __('Farbe', 'core'),
                    "param_name"    => "vc_list_colorselect",
                    'dependency'  => array(
                        'element' => 'vc_list_type',
                        'value' => array('icon'),
                    ),
                    'edit_field_class' => 'vc_col-xs-6',
                ),

                // size
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Größe', 'core'),
                    "description"   => __('in px', 'core'),
                    'param_name'    => 'vc_list_icon_size',
                    'value'         => '20px',
                    'dependency'  => array(
                        'element' => 'vc_list_type',
                        'value' => array('icon', 'img'),
                    ),
                    'edit_field_class' => 'vc_col-xs-3',
                ),
                // space after icon
                array(
                    'type'          => 'textfield',
                    'heading'       => __('Abstand', 'core'),
                    "description"   => __('in px', 'core'),
                    'param_name'    => 'vc_list_icon_margin',
                    'value'         => '10px',
                    'dependency'  => array(
                        'element' => 'vc_list_type',
                        'value' => array('icon', 'img'),
                    ),
                    'edit_field_class' => 'vc_col-xs-3',
                ),

                // layout general
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Layout', 'core'),
                    "param_name"  => 'seperator_layout',
                ),

            ),
            $this->list_layout_params_vc('list_', 'vc_list_type'),
            array(
                // layout mobile
                array(
                    "type"        => 'seperator',
                    "heading"     => __('Layout Mobil', 'core').' <u>'.__('(bis 767px)', 'core').'</u>',
                    "param_name"  => 'seperator_layout',
                ),
            ),
            $this->list_layout_params_vc('list_', 'vc_list_type', true),
            array(
                // css
                array(
                    'type' => 'css_editor',
                    'heading' => __( 'CSS', 'core' ),
                    'param_name' => 'css',
                    'group' => __( 'Designeinstellungen', 'core' ),
                ),
            )),
        ));

    }
    public function list_layout_params_vc($pre, $dep_el, $mobile=false) {
        $empty = array();
        $post = "";
        if ($mobile) {
            $empty = array( __('unverändert', 'core') => '', );
            $post = "_mobile";
        }
        return array(
            array(
                "type"          => "dropdown",
                "heading"       => __('Ausrichtung', 'core'),
                "param_name"    => $pre."text_align".$post,
                "value"         => array_merge( $empty, array(
                    _x('linksbündig', 'small', 'core') => 'left',
                    _x('zentriert', 'small', 'core') => 'center',
                    _x('rechtsbündig', 'small', 'core') => 'right',
                )),
                'edit_field_class' => 'vc_col-xs-4',
            ),
            array(
                'type'          => 'textfield',
                'heading'       => __('Abstand', 'core').' <u>'.__('zwischen Listenelementen', 'core').'</u>',
                "description"   => __('in px', 'core'),
                'param_name'    => $pre.'gap'.$post,
                'value'         => ($post == "" ? '10px' : ''),
                'edit_field_class' => 'vc_col-xs-4',
            ),
            array(
                "type"          => "checkbox",
                "heading"       => __("Strecken", 'core'),
                "description"   => __('auf volle Breite', 'core'),
                "param_name"     => $pre.'fullwidth'.$post,
                'edit_field_class' => 'vc_col-xs-4',
            ),

            // layout webicons
            array(
                "type"          => "dropdown",
                "heading"       => __('Position', 'core').' <u>'.__('der Punkte', 'core').'</u>',
                "param_name"    => $pre."icon_position_web".$post,
                "value"         => array_merge( $empty, array(
                    _x('links', 'small', 'core') => 'left',
                    _x('rechts', 'small', 'core') => 'right',
                )),
                'dependency'  => array(
                    'element' => $dep_el,
                    'value' => array('', 'web'),
                ),
                'edit_field_class' => 'vc_col-xs-4',
            ),
            array(
                "type"          => "dropdown",
                "heading"       => __('Ausrichtung', 'core').' <u>'.__('der Punkte', 'core').'</u>',
                "param_name"    => $pre."icon_align_web".$post,
                "value"         => array_merge( $empty, array(
                    _x('oben', 'small', 'core') => 'start',
                    _x('mittig zur ersten Zeile', 'small', 'core') => 'first',
                    _x('mittig', 'small', 'core') => 'center',
                    _x('unten', 'small', 'core') => 'end',
                )),
                'dependency'  => array(
                    'element' => $dep_el,
                    'value' => array('', 'web'),
                ),
                'edit_field_class' => 'vc_col-xs-4',
            ),

            // layout icon and img
            array(
                "type"          => "dropdown",
                "heading"       => __('Position', 'core').' <u>'.__('der Punkte', 'core').'</u>',
                "param_name"    => $pre."icon_position".$post,
                "value"         => array_merge( $empty, array(
                    _x('links', 'small', 'core') => 'left',
                    _x('rechts', 'small', 'core') => 'right',
                    _x('oben', 'small', 'core') => "top",
                    _x('unten', 'small', 'core') => 'bottom',
                )),
                'dependency'  => array(
                    'element' => $dep_el,
                    'value' => array('icon', 'img'),
                ),
                'edit_field_class' => 'vc_col-xs-4',
            ),
            array(
                "type"          => "dropdown",
                "heading"       => __('Ausrichtung', 'core').' <u>'.__('der Punkte', 'core').'</u>',
                "param_name"    => $pre."icon_align_y".$post,
                "value"         => array_merge( $empty, array(
                    _x('oben', 'small', 'core') => 'start',
                    _x('mittig zur ersten Zeile', 'small', 'core') => 'first',
                    _x('mittig', 'small', 'core') => 'center',
                    _x('unten', 'small', 'core') => 'end',
                )),
                'dependency'  => array(
                    'element' => $pre.'icon_position'.$post,
                    'value' => array('left', 'right'),
                ),
                'edit_field_class' => 'vc_col-xs-4',
            ),
            array(
                "type"          => "dropdown",
                "heading"       => __('Ausrichtung', 'core').' <u>'.__('der Punkte', 'core').'</u>',
                "param_name"    => $pre."icon_align_x".$post,
                "value"         => array_merge( $empty, array(
                    _x('links', 'small', 'core') => 'start',
                    _x('zentriert', 'small', 'core') => 'center',
                    _x('rechts', 'small', 'core') => 'end',
                )),
                'dependency'  => array(
                    'element' => $pre.'icon_position'.$post,
                    'value' => array('top', 'bottom'),
                ),
                'edit_field_class' => 'vc_col-xs-6',
            ),
        );
    }
    
    /* conditional content */
    public function cond_content_vc() {
        
        $types = $url_params = $user_roles = $times = array(
            _x('bitte wählen', 'small', 'core') => ""
        );
        
        // set types
        $types = array_merge($types, array(
            _x( "URL Parameter", 'small', 'core')   => "urlparam",
            _x( "Session Cookie", 'small', 'core')  => "cookie",
            _x( "Benutzerrolle", 'small', 'core')   => "userrole",
            _x( "Tageszeit", 'small', 'core')       => "time",
            _x( "Anzahl gefundener Beiträge", 'small', 'core') => "search",
            _x( "Taxonomie des aktuellen Beitrags", 'small', 'core') => "taxonomy"
        ));
        
        // set url params
        foreach( \url_handler::get_params() as $param ) {
            $name = isset($param["nicename"]) ? $param["nicename"] : $param["name"];
            $url_params[$name] = $param["name"];
        }
        $url_params[_x("individuell", 'small', 'core')] = "custom";
        
        // set user roles
        $all_roles = get_editable_roles();
        $user_roles[_x("unbekannt (nicht eingeloggt)", 'small', 'core')] = "none";
        foreach($all_roles as $role => $atts) {
            $user_roles[$atts["name"]] = $role;
        }
        
        // set times
        $times = array_merge($times, array(
            _x("morgens (ab 5 Uhr)", 'small', 'core') => "5-12",
            _x("mittags (ab 12 Uhr)", 'small', 'core') => "12-17",
            _x("abends (ab 17 Uhr)", 'small', 'core') => "17-23",
            _x("nachts (23 Uhr bis 5 Uhr)", 'small', 'core') => "23-24,0-5",
            _x("individuell", 'small', 'core') => "custom"
        ));

        if ( method_exists( '\Greyd\Posttypes\Dynamic_Posttypes', 'add_dynamic_posttypes' ) ) {
            \Greyd\Posttypes\Dynamic_Posttypes::add_dynamic_posttypes();
        }

        /**
         * Set taxonomy params
         * 
         * @since 0.9.4
         */
        $taxonomy_params = array();
        $all_taxonomies = array( 'default' => array(_x('bitte auswählen', 'small', 'core') => "") );
        $all_terms = array();
        $post_types = helper::get_all_posttypes();
        foreach( $post_types as $post_type ) {
            $taxonomies = helper::get_all_taxonomies( $post_type->slug );
            if ( !count($taxonomies) ) continue;

            $post_type_taxonomies = array();
            foreach( $taxonomies as $taxonomy ) {
                if ( $taxonomy->slug === 'post_format' ) continue;

                $terms = helper::get_all_terms( $taxonomy->slug );
                if ( count($terms) ) {
                    $taxonomy_terms = array();
                    foreach( $terms as $term ) {
                        $taxonomy_terms[ $term->title ] = $term->slug;
                    }
                    $taxonomy_params[] = array(
                        "type"          => "checkbox",
                        "heading"       => sprintf(__('%s wählen', 'core'), $taxonomy->title),
                        "param_name"    => $taxonomy->slug."_terms",
                        'value'         => $taxonomy_terms,
                        "edit_field_class" => 'vc_col-xs-4 checkbox_list',
                        'dependency'    => array(
                            'element'   => 'condition_taxonomy',
                            'value'     => $taxonomy->slug
                        )
                    );
                }

                $post_type_taxonomies[ $taxonomy->title." (".count($terms).")" ] = $taxonomy->slug;
            }
            $all_taxonomies[ $post_type->title ] = $post_type_taxonomies;
        }
        array_unshift( $taxonomy_params, array(
            "type"          => "select",
            "heading"       => __('Taxonomie', 'core'),
            "param_name"    => "condition_taxonomy",
            // "description"   => json_encode( $all_taxonomies ),
            'holder'        => 'div',
            'options'       => $all_taxonomies,
            "edit_field_class" => 'vc_col-xs-4',
            'dependency'    => array(
                'element'   => 'type',
                'value'     => "taxonomy"
            )
        ) );
        
        
        vc_map(array(
            'name'          => __( 'Conditional Content', 'core' ),
            // 'name'          => get_post_type($_GET['post']),
            'description'   => __( 'Abhängigkeit von Nutzerrollen, Tageszeit und anderen Parametern', 'core' ),
            "base"          => "vc_cond_content", // Shortcode name
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/condition.svg",
            'is_container'  => true,
            'show_settings_on_create' => false,
            'as_parent'     => array(
                'only'      => "vc_cond_content_item",
            ),
            'js_view'       => 'VcBackendTtaTabsView',
            'custom_markup' => '
                <div class="vc_tta-container" data-vc-action="collapse">
                    <div class="vc_general vc_tta vc_tta-tabs vc_tta-color-backend-tabs-white vc_tta-style-flat vc_tta-shape-rounded vc_tta-spacing-1 vc_tta-tabs-position-top vc_tta-controls-align-left">
                        <div class="vc_tta-tabs-container">'
                                       . '<ul class="vc_tta-tabs-list">'
                                       . '<li class="vc_tta-tab" data-vc-tab data-vc-target-model-id="{{ model_id }}" data-element_type="vc_cond_content_item"><a href="javascript:;" data-vc-tabs data-vc-container=".vc_tta" data-vc-target="[data-model-id=\'{{ model_id }}\']" data-vc-target-model-id="{{ model_id }}"><span class="vc_tta-title-text">{{ section_title }}</span></a></li>'
                                       . '</ul>
                        </div>
                        <div class="vc_tta-panels vc_clearfix {{container-class}}">
                          {{ content }}
                        </div>
                    </div>
                </div>',
            'default_content' => '
                [vc_cond_content_item title="'.__( 'erste Bedingung', 'core').'"][/vc_cond_content_item]
                [vc_cond_content_item title="'.__( 'zweite Bedingung', 'core' ).'"][/vc_cond_content_item]
            ',
            'admin_enqueue_js' => array(
                vc_asset_url( 'lib/vc_tabs/vc-tabs.min.js' ), // required tta-tabs javascript
            ),
            'params' => array(
                // Info
                array(
                    'type' => 'info_text',
                    'param_name' => 'info_text',
                    'text' => __( 'Dieser Container zeigt Inhalte in Abhängigkeit von angegebenen Parametern an. Die genauen Werte stellst du ein, indem du bei „Bedingung“ auf Bearbeiten klickst.', 'core' ),
                    'styling' => 'info',
                    'edit_field_class' => 'vc_col-xs-12',
                ),
                array(
                    'type'        => 'checkbox',
                    'heading'     => __('Debug Modus', 'core'),
                    'description' => __('Es wird ein Text im Frontend dargestellt, der dabei hilft, Probleme zu identifizieren. Achtung: Nicht auf Live-Seiten verwenden!', 'core'),
                    'param_name'  => 'debug',
                    'value'       => __('aktivieren', 'core')
                ),
            ),
        ));
        
        
        vc_map(array(
            'name'          => __( 'Bedingung', 'core' ),
            "base"          => "vc_cond_content_item", // Shortcode name
            "category"      => __("Inhalt", 'core'),
            "icon"          => get_template_directory_uri()."/assets/icon/condition.svg",
            'allowed_container_element' => 'vc_row',
            'is_container'  => true,
            'show_settings_on_create' => false,
            'as_child'      => array(
                'only'      => "vc_cond_content",
            ),
            "category"    => __("Inhalt", 'core'),
            'js_view' => 'VcBackendTtaSectionView',
            'custom_markup' => '
                <div class="vc_tta-panel-heading">
                    <h4 class="vc_tta-panel-title vc_tta-controls-icon-position-left"><a href="javascript:;" data-vc-target="[data-model-id=\'{{ model_id }}\']" data-vc-accordion data-vc-container=".vc_tta-container"><span class="vc_tta-title-text">{{ section_title }}</span><i class="vc_tta-controls-icon vc_tta-controls-icon-plus"></i></a></h4>
                </div>
                <div class="vc_tta-panel-body">
                    {{ editor_controls }}
                    <div class="{{ container-class }}">
                    {{ content }}
                    </div>
                </div>',
            'default_content' => '',
            'params' => array(
                
                // Title
                array(
                    'type' => 'textfield',
                    'param_name' => 'title',
                    'heading' => __( 'Tab Name', 'core' ),
                    'description' => __( 'Name des Tabs im Backend.', 'core' ),
                    'edit_field_class' => 'vc_col-xs-6',
                ),
                
                // Überschrift
                array(
                    "type"        => 'seperator',
                    "param_name"  => 'seperator_title',
                ),
                
                // && oder ||
                array(
                    "type"          => "dropdown",
                    'heading'     => __('Was muss zutreffen?', 'core'),
                    'param_name'  => 'condition_type',
                    'edit_field_class' => 'vc_col-xs-6',
                    'admin_label'   =>  true,
                    "value"         => array(
                        _x('mindestens eine Eigenschaft (oder)', 'small', 'core') => '||',
                        _x('alle Eigenschaften (und)', 'small', 'core') => '&&',
                    ),
                ),
                
                // Optionen
                array(
                    'type'        => 'param_group',
                    'heading'     => __('Eigenschaften', 'core'),
                    'description' => __( 'Sobald eine der Eigenschaften zutrifft, wird der Container angezeigt. Achte darauf, keine sich widersprechenden Werte einzustellen.', 'core' ),
                    'param_name'  => 'options',
                    'params'      => array_merge(
                        array(

                            // Condition Type
                            array(
                                'type'          => 'dropdown',
                                'param_name'    => 'type',
                                'heading'       => __( "Art der Abhängigkeit", 'core' ),
                                'edit_field_class' => 'vc_col-xs-4',
                                'admin_label'   =>  true,
                                "value"         => $types
                            ),

                            // URL Params
                            array(
                                'type'          => 'dropdown',
                                'param_name'    => 'urlparam',
                                'heading'       => __( 'Parameter', 'core' ),
                                "value"         => $url_params,
                                'edit_field_class' => 'vc_col-xs-4',
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => array("urlparam", "cookie"),
                                )
                            ),
                            array(
                                'type'          => 'textfield',
                                'param_name'    => 'custom_urlparam',
                                'heading'       => __( 'individueller Parameter', 'core' ),
                                'description'   => __('Bitte keine Sonderzeichen oder Leerzeichen verwenden.', 'core'),
                                'edit_field_class' => 'vc_col-xs-4',
                                'dependency'    => array(
                                    'element'   => 'urlparam',
                                    'value'     => "custom",
                                )
                            ),
                            array(
                                "type"          => 'new_line',
                                "param_name"    => 'new_line_urlparam',
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => array("urlparam", "cookie"),
                                )
                            ),
                            array(
                                "type"          => "dropdown",
                                'heading'     => __('Bedingung', 'core'),
                                'param_name'  => 'condition_urlparam',
                                'edit_field_class' => 'vc_col-xs-3',
                                "value"         => array(
                                    _x('hat den Wert:', 'small', 'core') => 'is',
                                    _x('enthält den Wert:', 'small', 'core') => 'has',
                                    _x('hat nicht den Wert:', 'small', 'core') => 'is_not',
                                    _x('ist gesetzt', 'small', 'core') => 'not_empty',
                                    _x('ist nicht gesetzt', 'small', 'core') => 'empty',
                                ),
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => array("urlparam", "cookie"),
                                )
                            ),
                            array(
                                'type' => 'textfield',
                                'param_name' => 'urlparam_value',
                                'heading' => __( 'Wert', 'core' ),
                                'edit_field_class' => 'vc_col-xs-6',
                                'dependency'  => array(
                                    'element' => 'condition_urlparam',
                                    'value'   => array('is','is_not','has'),
                                ),
                            ),

                            // Userrole
                            array(
                                "type"          => "dropdown",
                                'heading'     => __('Bedingung', 'core'),
                                'param_name'  => 'condition_userrole',
                                'edit_field_class' => 'vc_col-xs-3',
                                "value"         => array(
                                    _x('ist:', 'small', 'core') => 'is',
                                    _x('ist nicht:', 'small', 'core') => 'is_not'
                                ),
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => "userrole",
                                )
                            ),
                            array(
                                'type'          => 'dropdown',
                                'param_name'    => 'userrole_value',
                                'heading'       => __( 'Nutzerrolle', 'core' ),
                                "value"         => $user_roles,
                                'edit_field_class' => 'vc_col-xs-4',
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => "userrole",
                                )
                            ),

                            // Time
                            array(
                                "type"          => "dropdown",
                                'heading'     => __('Bedingung', 'core'),
                                'param_name'  => 'condition_time',
                                'edit_field_class' => 'vc_col-xs-3',
                                "value"         => array(
                                    _x('ist:', 'small', 'core') => 'is',
                                    _x('ist nicht:', 'small', 'core') => 'is_not'
                                ),
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => "time",
                                )
                            ),
                            array(
                                'type'          => 'dropdown',
                                'param_name'    => 'time_value',
                                'heading'       => __( 'Tageszeit', 'core' ),
                                "value"         => $times,
                                'edit_field_class' => 'vc_col-xs-4',
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => "time",
                                )
                            ),
                            array(
                                'type'          => 'textfield',
                                'param_name'    => 'custom_time',
                                'heading'       => __( 'individuelle Uhrzeit', 'core' ),
                                'description'   => __('Uhrzeiten in vollen Stunden oder mit Minuten angeben und mit Bindestrichen trennen (z.B. für 12 bis 13:30 Uhr: 12-13:30). Mehrere Zeitabschnitte mit Komma trennen (z.B. 12-13,15-16). Uhrzeiten vor und nach Mitternacht als einzelne Abschnitte angeben (z.B. für 22 bis 4 Uhr morgens: 22-24,0-4).', 'core'),
                                'edit_field_class' => 'vc_col-xs-8',
                                'dependency'    => array(
                                    'element'   => 'time_value',
                                    'value'     => "custom",
                                )
                            ),

                            // Suche
                            array(
                                "type"          => "dropdown",
                                'heading'     => __('Bedingung', 'core'),
                                'param_name'  => 'condition_search',
                                'edit_field_class' => 'vc_col-xs-8',
                                "value"         => array(
                                    _x('mehrere Ergebnisse gefunden', 'small', 'core') => 'multiple',
                                    _x('genau 1 Ergebnis gefunden', 'small', 'core') => 'single',
                                    _x('Suchergebnisse sind leer', 'small', 'core') => 'empty'
                                ),
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => "search"
                                )
                            ),
                            array(
                                "type"    => "info_text",
                                "text"    => __('Die Abhängigkeit von gefundenen Beiträgen funktioniert nur in „Suche“- & „Archiv“-Templates. Andererseits wird dieser Inhalt nicht dargestellt.', 'core'),
                                "styling" => "info", 
                                "param_name" => 'info_search',
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => "search"
                                )
                            ),
                        ),
                        $taxonomy_params,
                        array(
                            array(
                                "type"    => "info_text",
                                "text"    => __('Die Abhängigkeit von Taxonomien funktioniert nur in „Beitragsseiten“-Templates. Andererseits wird dieser Inhalt nicht dargestellt.', 'core'),
                                "styling" => "info", 
                                "param_name" => 'info_taxonomy',
                                'dependency'    => array(
                                    'element'   => 'type',
                                    'value'     => "taxonomy"
                                )
                            ),
                            
                            // Infos
                            array(
                                "type"    => "info_text",
                                "above"    => __("Für Formularparameter werden automatisch verschiedene Werte gesetzt, die den Zustand des Formulareintrages widerspiegeln:", 'core'),
                                "text"    => 
                                    "<ol style=\"margin:1em 0 1em 3em;\">
                                        <li><b>true-just</b>: "._x('die Aktion (Opt-in bzw. Opt-out) wurde mit diesem Seitenaufruf erfolgreich durchgeführt.', 'small', 'core')."</li>
                                        <li><b>true-already</b>: "._x('die Aktion (Opt-in bzw. Opt-out) wurde bereits erfolgreich durchgeführt.', 'small', 'core')."</li>
                                        <li><b>false-found</b>: "._x('es konnte kein entsprechender Eintrag gefunden werden.', 'small', 'core')."</li>
                                        <li><b>false-out</b>: "._x('der Eintrag konnte nicht verifiziert werden (Opt-in), da ihm bereits widersprochen wurde (Opt-out).', 'small', 'core')."</li>
                                    </ol>
                                    <i>".__('Beispiel: Du möchtest einen Inhalt nur anzeigen, wenn der Nutzer seine Identität bestätigt hat (Opt-in). Wähle als Parameter „Formular Opt-in“. Als Bedingung stellst du „enthält den Wert:“ ein und als Wert gibst du „true“ ein. Jetzt trifft die Bedingung auf beide Werte mit dem Zusatz „true“ zu.', 'core')."</i>",
                                "styling" => "info", 
                                "param_name" => 'info_form_params',
                                'dependency'    => array(
                                    'element'   => 'urlparam',
                                    'value'     => array('optin','optout')
                                )
                            ),
                            array(
                                "type"    => "info_text",
                                "above"    => __("So findest du die Formular ID heraus:", 'core'),
                                "text"    => 
                                    sprintf(__('Wenn du ein Formular bearbeitest, sollte oben in der URL-Leiste deines Browsers etwas stehen wie <i>%s</i>. Die Zahl nach <i>%s</i> ist die ID, in diesem Beispiel also <i>%s</i>.', 'core'), '<span style="white-space:nowrap;">.../wp-admin/post.php?post=10&action=edit</span>', 'post=', '10'),
                                "styling" => "info", 
                                "param_name" => 'info_form_param_id',
                                'dependency'    => array(
                                    'element'   => 'urlparam',
                                    'value'     => array('form')
                                )
                            )
                        )
                    )
                )
            )
        ));
    }
    
    /* counter */
    public function counter_vc() {
        
        
        /*
            define dynamic params
        */
        $params = [];
        $all_taxonomies = [];
        
        // get posttypes
        $all_posttypes = helper::get_all_posttypes();
        $posttypes = [ _x('bitte wählen', 'small', 'core') => '' ];
        
        // loop through posttypes
        foreach ($all_posttypes as $posttype) {
            $slug   = $posttype->slug;
            $label  = $posttype->title." (".$posttype->count.")";
            $posttypes[$label] = $slug;
            
            // get taxonomies
            $all_taxonomies[ $slug ] = get_object_taxonomies($slug, 'objects');
        }
        unset( $posttypes['attachment'], $posttypes['page'] );
        
        // add posttype control
        $params[] = array(
            'type'              => 'dropdown',
            'param_name'        => 'posttype',
            'heading'           => __( 'Post Type', 'core' ),
            'value'             => $posttypes,
            'edit_field_class'  => 'vc_col-xs-4',
            'dependency'        => array(
                'element'   => 'type',
                'value'     => array( 'dynamic' ),
            ),
            'admin_label'       => true,
        );
        
        // loop through taxonomies
        foreach ($all_taxonomies as $posttype => $taxonomies) {
            
            $all_terms = [];
            $posttype_taxonomies = [_x('alle Beiträge', 'small', 'core') => '' ];
            
            foreach( $taxonomies as $taxonomy ) {
                $slug   = $taxonomy->name;
                $label  = $taxonomy->labels->singular_name;
                $posttype_taxonomies[ $label ] = $slug;
                
                // get terms
                $all_terms[ $slug ] = get_terms( [ 'taxonomy' => $slug, 'hide_empty' => false ] );
            }
            
            // add taxonomy control
            $params[] = array(
                'type'              => 'dropdown',
                'param_name'        => $posttype.'_taxonomy',
                'heading'           => __( 'Taxonomie', 'core' ),
                'value'             => $posttype_taxonomies,
                'edit_field_class'  => 'vc_col-xs-4',
                'dependency'        => array(
                    'element'   => 'posttype',
                    'value'     => array( $posttype ),
                ),
            );
            
        
            // loop through terms
            foreach ($all_terms as $tax => $terms) {
                
                $taxonomy_terms = [_x('bitte wählen', 'small', 'core') => '' ];

                foreach( $terms as $term ) {
                    $id     = $term->term_id;
                    $label  = $term->name." (".$term->count.")";
                    $taxonomy_terms[ $label ] = $id;
                }
                
                // add term control
                $params[] = array(
                    'type'              => 'dropdown',
                    'param_name'        => $tax.'_term',
                    'heading'           => __( 'Begriff', 'core' ),
                    'value'             => $taxonomy_terms,
                    'edit_field_class'  => 'vc_col-xs-4',
                    'dependency'        => array(
                        'element'   => $posttype.'_taxonomy',
                        'value'     => array( $tax )
                    )
                );
            }
        }
        
        /*
            define static params
        */
        $vc_params = array_merge(
            array(

                // manual vs. dynamic
                array(
                    'type'              => 'dropdown',
                    'param_name'        => 'type',
                    'heading'           => __( 'Art', 'core' ),
                    'value'             => array(
                        _x('manuell', 'small', 'core')                      => 'manual',
                        _x('Anzahl bestimmter Beiträge', 'small', 'core')   => 'dynamic',
                        _x('Anzahl gefundener Beiträge', 'small', 'core')   => 'found',
                    ),
                    'edit_field_class'  => 'vc_col-xs-6',
                    'admin_label'       => true,
                ),
                array(
                    'type'              => 'textfield',
                    'param_name'        => 'manual',
                    'heading'           => __( 'Wert', 'core' ),
                    'description'       => __('Bitte nur Zahlen eingeben.', 'core'),
                    'value'             => '42',
                    'edit_field_class'  => 'vc_col-xs-6',
                    'dependency'        => array(
                        'element'   => 'type',
                        'value'     => array('manual'),
                    ),
                    'admin_label'       => true,
                ),
                array(
                    "type"              => 'new_line',
                    "param_name"        => 'new_line_before_dynamic'
                ),
                array(
                    "type"              => "info_text",
                    "param_name"        => 'info_found',
                    "text"              => __("Die Anzahl der gefundenen Beiträge auszulesen funktioniert nur in Archiv- & Suche-Templates.", 'core'),
                    "styling"           => "info", 
                    'edit_field_class'  => 'vc_col-xs-8',
                    'dependency'        => array(
                        'element'   => 'type',
                        'value'     => array('found'),
                    ),
                ),
            ),
            $params,
            array(
                array(
                    "type"              => 'seperator',
                    "param_name"        => 'seperator_content',
                    'heading'           => __( 'Text', 'core' ),
                ),
                array(
                    'type'              => 'textarea_html',
                    'param_name'        => 'content',
                    'description'       => sprintf(
                        __('Benutze den Platzhalter %s um den Wert einzufügen.', 'core'),
                        '<span class="dtag" style="margin-right: 0;"><span onclick="composer.insertTagText(this)">_count_</span></span>'
                    ),
                    'value'             => '_count_',
                    'edit_field_class'  => 'vc_col-xs-12',
                ),
                array(
                    "type"              => 'seperator',
                    "param_name"        => 'seperator_animation',
                    'heading'           => __( 'Animation', 'core' ),
                ),
                array(
                    'type'              => 'textfield',
                    'param_name'        => 'anim_time',
                    'heading'           => __( 'Dauer der Animation', 'core' ),
                    'description'       => __('In Sekunden. Frei lassen für keine Animation.', 'core'),
                    'value'             => '1s',
                    'edit_field_class'  => 'vc_col-xs-4'
                ),
            )
        );
        
        /*
            add vc module
        */
        vc_map(
            array(
                "name"          => __('Counter', 'core'),
                "description"   => __('Animierter Zähler für manuelle Werte oder Beiträge', 'core'),
                "base"          => 'vc_counter',
                "icon"          => get_template_directory_uri()."/assets/icon/counter.svg",
                "params"        => $vc_params
            )
        );
    }

    /* modify params */
    public function mod_defaults_vc() {

        // headlines
        $map = \WPBMap::getShortCode( 'vc_headlines' );
        foreach ( (array) $map['params'] as $params) {
            if ($params['param_name'] == 'h') {
                $params['value'] = array(
                    __('keine Größe (wie Text)', 'core') => 'null',
                    __('Überschrift', 'core').' 1 ('.get_theme_mod('h1_font_size').'em)' => 'h1',
                    __('Überschrift', 'core').' 2 ('.get_theme_mod('h2_font_size').'em)' => 'h2',
                    __('Überschrift', 'core').' 3 ('.get_theme_mod('h3_font_size').'em)' => 'h3',
                    __('Überschrift', 'core').' 4 ('.get_theme_mod('h4_font_size').'em)' => 'h4',
                    __('Überschrift', 'core').' 5 ('.get_theme_mod('h5_font_size').'em)' => 'h5',
                    __('Überschrift', 'core').' 6 ('.get_theme_mod('h6_font_size').'em)' => 'h6',
                );
                vc_update_shortcode_param( 'vc_headlines', $params );
            }
        }

        // get necessary post objects
        $posttypes = helper::get_all_posttypes();
        $all_posttypes = $all_pts = $cat_pts = $tag_pts = $custom_pts = $custom_taxonomies = $all_custom_taxonomies = array();
        foreach ($posttypes as $posttype) {
            if ($posttype->count > 0) {
                $slug = $posttype->slug;
                $title = $posttype->title." (".$posttype->count.")";
                $all_posttypes[$title] = $slug;
                if ($slug != 'page') {
                    $all_pts[$title] = $slug;
                    if (helper::get_category_slug($slug)) $cat_pts[$title] = $slug;
                    if (helper::get_tag_slug($slug)) $tag_pts[$title] = $slug;
                    $custom_taxs = helper::get_custom_taxonomies($slug);
                    if ($custom_taxs) {
                        $custom_taxonomies[$slug] = $custom_taxs;
                        $all_custom_taxonomies = array_merge($all_custom_taxonomies, $custom_taxs);
                        $custom_pts[$title] = $slug;
                    }
                }
            }
        }

        // posts_links_vc
        $shortcode = 'vc_posts_links';
        $map = \WPBMap::getShortCode( $shortcode );
        foreach ( (array) $map['params'] as $params) {
            if ($params['param_name'] == 'pt') {
                $params['options'] = array( 'default' => $all_pts);
                vc_update_shortcode_param( $shortcode, $params );
            }
            else if ($params['param_name'] == 'pt_by_cat') {
                $params['options'] = array( 'default' => $cat_pts);
                vc_update_shortcode_param( $shortcode, $params );
            }
            else if ($params['param_name'] == 'pt_by_tag') {
                $params['options'] = array( 'default' => $tag_pts);
                vc_update_shortcode_param( $shortcode, $params );
            }
        }

        // posts_overview_vc
        $shortcode = 'vc_posts_overview';
        $map = \WPBMap::getShortCode( $shortcode );
        
        // add all posttypes to dropdown
        foreach ( (array) $map['params'] as $params) {
            // if(!array_key_exists('param_name', $params)) {
            //     $params['param_name'] = null;
            // }
            
            if ($params['param_name'] == 'pt') {
                $params['options'] = array( 'default' => $all_posttypes);
                vc_update_shortcode_param( $shortcode, $params );
            }
            else if ($params['param_name'] == 'posts') {
                $params['params'] = array_merge(array(
                    array(
                        'type'        => 'dropdown',
                        'heading'     => __('Post Type', 'core'),
                        'param_name'  => 'posts_pt',
                        'admin_label' => true,
                        'edit_field_class' => 'vc_col-xs-6',
                        'value'       => $all_posttypes,
                    ),
                ),
                $this->posts_posttype_params_vc($all_posttypes) );
                vc_update_shortcode_param( $shortcode, $params );
            }
        }
        
        // add category dropdown
        foreach ($cat_pts as $title => $slug) {
            $categories = helper::get_category_slug($slug);
            $terms = helper::get_all_terms($categories);
            $value = array( _x('alle', 'small', 'core') => 0 );
            foreach($terms as $term) {
                $value[$term->title." (".$term->count.")"] = $term->id;
            }
            // debug($value);
            // $value = helper::get_vc_taxonomies($categories);
            // debug($value);
            $param_name = $slug.'_categoryid';
            if ($slug == "post") $param_name = 'categoryid';
            if ($slug == "product") $param_name = 'woo_categoryid';
            vc_add_params($shortcode, array(
                array(
                    "type"        => 'dropdown',
                    "heading"     => __('Kategorie', 'core'),
                    "param_name"  => $param_name,
                    'edit_field_class' => 'vc_col-xs-3',
                    "value" 	  => $value,
                    'dependency'  => array(
                        'element' => 'pt',
                        'value' => array($slug)
                    ),
                    "weight"        => 9,
                ),
            ));
        }
        
        // add tag dropdown
        foreach ($tag_pts as $title => $slug) {
            $tags = helper::get_tag_slug($slug);
            $terms = helper::get_all_terms($tags);
            $value = array( _x('alle', 'small', 'core') => 0 );
            foreach($terms as $term) {
                $value[$term->title." (".$term->count.")"] = $term->id;
            }
            // debug($value);
            // $value = helper::get_vc_taxonomies($tags);
            // debug($value);
            $param_name = $slug.'_tagid';
            if ($slug == "post") $param_name = 'tagid';
            if ($slug == "product") $param_name = 'woo_tagid';
            vc_add_params($shortcode, array(
                array(
                    "type"        => 'dropdown',
                    "heading"     => __('Schlagwort', 'core'),
                    "param_name"  => $param_name,
                    'edit_field_class' => 'vc_col-xs-3',
                    "value" 	  => $value,
                    'dependency'  => array(
                        'element' => 'pt',
                        'value' => array($slug)
                    ),
                    "weight"        => 9,
                ),
            ));
        }
        
        // add custom taxonomy dropdowns
        foreach ($custom_pts as $title => $slug) {
            $taxonomies = $custom_taxonomies[$slug];
            vc_add_params($shortcode, array(
                array(
                    "type"        => 'sub_seperator',
                    "heading"     => __('Individuelle Taxonomien', 'core'),
                    "param_name"  => $slug."_customtax_headline",
                    'dependency'  => array(
                        'element' => 'pt',
                        'value' => array($slug)
                    ),
                    "weight"        => 7,
                ),
            ));
            foreach( $taxonomies as $name => $label ) {
                $terms = helper::get_all_terms($name);
                $value = array( _x('alle', 'small', 'core') => 0 );
                foreach($terms as $term) {
                    $value[$term->title." (".$term->count.")"] = $term->id;
                }
                vc_add_params($shortcode, array(
                    array(
                        "type"        => 'dropdown',
                        "heading"     => $label,
                        "param_name"  => "customtax_".$name,
                        'edit_field_class' => 'vc_col-xs-3',
                        "value" 	  => $value,
                        'dependency'  => array(
                            'element' => 'pt',
                            'value' => array($slug)
                        ),
                        "weight"        => 7,
                    ),
                ));
            }
        }

        // vc_posts_tp (Gefundene Beiträge)
        $shortcode = 'vc_posts_tp';
        $map = \WPBMap::getShortCode( $shortcode );
        foreach ( (array) $map['params'] as $params) {
            if ($params['param_name'] == 'table_setup') {
                foreach( $params['params'] as $i => $param ) {
                    if ($param['param_name'] == 'post_taxonomy') {
                        $params['params'][$i]['value'] = array_merge(
                            array(
                                _x('bitte wählen', 'small', 'core') => ''
                            ),
                            array_flip( $all_custom_taxonomies )
                        );
                        break;
                    }
                }
                vc_update_shortcode_param( $shortcode, $params );
                break;
            }
        }

        // search_vc
        $shortcode = 'vc_search';
        $map = \WPBMap::getShortCode( $shortcode );
        foreach ( (array) $map['params'] as $params) {
            if ($params['param_name'] == 'filter') {
                $params['value'] = array_merge(
                    array(
                        _x('alle Post Types', 'small', 'core') => '',
                    ), 
                    $all_posttypes
                );
                vc_update_shortcode_param( $shortcode, $params );
                break;
            }
        }

        // old search_form_vc
        $shortcode = 'vc_search_form';
        $map = \WPBMap::getShortCode( $shortcode );
        if ( $map && isset($map['params']) ) {
            foreach ( (array) $map['params'] as $params) {
                if ($params['param_name'] == 'search_posttype') {
                    $params['value'] = array_merge(array(
                        _x('automatisch', 'small', 'core') => '',
                        _x('alle Post Types', 'small', 'core') => 'any',
                        _x('Auswahl anzeigen', 'small', 'core') => 'show_choice',
                        ), 
                        $all_posttypes );
                    vc_update_shortcode_param( 'vc_search_form', $params );
                }
            }
            foreach ($cat_pts as $title => $slug) {
                if ($slug != 'page') {
                    $categories = helper::get_category_slug($slug);
                    $terms = helper::get_all_terms($categories);
                    $value = array(
                        _x('automatisch', 'small', 'core') => '',
                        _x('alle Kategorien', 'small', 'core') => 0,
                    );
                    if ($slug == 'post') $value[_x('Auswahl anzeigen', 'small', 'core')] = 'show_choice';
                    foreach($terms as $term) {
                        $value[$term->title." (".$term->count.")"] = $term->id;
                    }
                    $param_name = 'search_'.$slug.'_category';
                    // debug($value);
                    vc_add_params($shortcode, array(
                        array(
                            'type' => 'dropdown',
                            'heading' => __('Kategorie', 'core'),
                            'param_name' => $param_name,
                            'edit_field_class' => 'vc_col-xs-4',
                            'value' => $value,
                            'dependency'  => array(
                                'element'   => 'search_posttype',
                                'value' => array($slug)
                            ),
                            "weight"        => 9,
                        ),
                    ));
                }
            }
        }
        
    }

}


