esc_html__("Testimonial cards", "keydesign"), "description" => esc_html__("List all your client testimonials in a carousel.", "keydesign"), "base" => "tek_testimonialcards", "class" => "", "show_settings_on_create" => true, "content_element" => true, "as_parent" => array('only' => 'tek_testimonialcards_single'), "icon" => plugins_url('assets/element_icons/testimonial-cards.png', dirname(__FILE__)), "category" => esc_html__("KeyDesign Elements", "keydesign"), "js_view" => 'VcColumnView', "params" => array( array( "type" => "textfield", "class" => "", "heading" => esc_html__("Title section", "keydesign"), "param_name" => "tcard_title", "value" => "", "description" => esc_html__("Add testimonials section title here.", "keydesign") ), array( "type" => "colorpicker", "class" => "", "heading" => esc_html__("Title section color", "keydesign"), "param_name" => "tcard_title_color", "value" => "", "description" => esc_html__("Select title color. If none selected, the default theme color will be used.", "keydesign"), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Navigation style","keydesign"), "param_name" => "tcard_nav_style", "value" => array( "Arrows" => "nav-arrows", "Dots" => "nav-dots", ), "save_always" => true, "description" => esc_html__("Select navigation style.", "keydesign") ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Navigation arrows color", "keydesign"), "param_name" => "tcard_navigation_color", "value" => array( "Black" => "black-navigation", "White" => "white-navigation", ), "save_always" => true, "description" => esc_html__("Choose the navigation arrows color.", "keydesign"), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Enable autoplay","keydesign"), "param_name" => "tcard_autoplay", "value" => array( "Off" => "auto_off", "On" => "auto_on" ), "save_always" => true, "description" => esc_html__("Carousel autoplay settings.", "keydesign") ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Autoplay speed","keydesign"), "param_name" => "tcard_autoplay_speed", "value" => array( "10s" => "10000", "9s" => "9000", "8s" => "8000", "7s" => "7000", "6s" => "6000", "5s" => "5000", "4s" => "4000", "3s" => "3000", ), "save_always" => true, "dependency" => array( "element" => "tcard_autoplay", "value" => array("auto_on") ), "description" => esc_html__("Carousel autoplay speed.", "keydesign") ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Stop on hover","keydesign"), "param_name" => "tcard_stoponhover", "value" => array( "Off" => "hover_off", "On" => "hover_on" ), "save_always" => true, "dependency" => array( "element" => "tcard_autoplay", "value" => array("auto_on") ), "description" => esc_html__("Stop sliding carousel on mouse over.", "keydesign") ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Extra class name", "keydesign"), "param_name" => "tcard_extra_class", "value" => "", "description" => esc_html__("If you wish to style a particular content element differently, then use this field to add a class name and then refer to it in your css file.", "keydesign") ), ) )); // Shortcode configuration vc_map(array( "name" => esc_html__("Testimonial card", "keydesign"), "base" => "tek_testimonialcards_single", "content_element" => true, "as_child" => array('only' => 'tek_testimonialcards'), "icon" => plugins_url('assets/element_icons/testimonial-card.png', dirname(__FILE__)), "params" => array( array( "type" => "textfield", "class" => "kd-back-desc", "heading" => esc_html__("Author name", "keydesign"), "param_name" => "tcards_author_name", "holder" => "div", "value" => "", "description" => esc_html__("Write the testimonial author name.", "keydesign"), ), array( "type" => "colorpicker", "class" => "", "heading" => esc_html__("Author name text color", "keydesign"), "param_name" => "tcards_author_name_color", "value" => "", "description" => esc_html__("Choose author name text color. If none selected, the default theme color will be used.", "keydesign"), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Author job", "keydesign"), "param_name" => "tcards_author_job", "value" => "", "description" => esc_html__("Write the testimonial author job.", "keydesign"), ), array( "type" => "colorpicker", "class" => "", "heading" => esc_html__("Author job text color", "keydesign"), "param_name" => "tcards_author_job_color", "value" => "", "description" => esc_html__("Choose author job text color. If none selected, the default theme color will be used.", "keydesign"), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Author image source", "keydesign"), "param_name" => "image_source", "value" => array( "Media library" => "media_library", "External link" => "external_link", ), "description" => esc_html__("Select image source.", "keydesign"), "save_always" => true, ), array( "type" => "attach_image", "class" => "", "heading" => esc_html__("Author profile image", "keydesign"), "param_name" => "tcards_author_image", "value" => "", "description" => esc_html__("Upload author profile image.", "keydesign"), "dependency" => array( "element" => "image_source", "value" => array("media_library") ), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Image external source", "keydesign"), "param_name" => "ext_image", "value" => "", "description" => esc_html__("Enter image external link.", "keydesign"), "dependency" => array( "element" => "image_source", "value" => array("external_link") ), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Image size", "keydesign"), "param_name" => "ext_image_size", "value" => "", "description" => esc_html__("Enter image size in pixels. Example: 100x100 (Width x Height).", "keydesign"), "dependency" => array( "element" => "image_source", "value" => array("external_link") ), ), array( "type" => "textarea", "class" => "", "heading" => esc_html__("Testimonial text", "keydesign"), "param_name" => "tcards_testimonial_text", "value" => "", "description" => esc_html__("Write the testimonial message here.", "keydesign") ), array( "type" => "colorpicker", "class" => "", "heading" => esc_html__("Testimonial text color", "keydesign"), "param_name" => "tcards_testimonial_text_color", "value" => "", "description" => esc_html__("Choose testimonial text color. If none selected, the default theme color will be used.", "keydesign"), ), array( "type" => "colorpicker", "class" => "", "heading" => esc_html__("Testimonial box background color", "keydesign"), "param_name" => "tcards_testimonial_bg_color", "value" => "", "description" => esc_html__("Choose testimonial box background color. If none selected, the default theme color will be used.", "keydesign"), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("CSS Animation", "keydesign"), "param_name" => "css_animation", "value" => array( "No" => "", "Fade In" => "kd-animated fadeIn", "Fade In Down" => "kd-animated fadeInDown", "Fade In Left" => "kd-animated fadeInLeft", "Fade In Right" => "kd-animated fadeInRight", "Fade In Up" => "kd-animated fadeInUp", "Zoom In" => "kd-animated zoomIn", ), "save_always" => true, "admin_label" => true, "description" => esc_html__("Select type of animation for element to be animated when it enters the browsers viewport (Note: works only in modern browsers).", "keydesign"), "group" => esc_html__( "Extras", "keydesign" ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Animation Delay", "keydesign"), "param_name" => "elem_animation_delay", "value" => array( "0 ms" => "", "200 ms" => "200", "400 ms" => "400", "600 ms" => "600", "800 ms" => "800", "1 s" => "1000", ), "dependency" => array( "element" => "css_animation", "value" => array("kd-animated fadeIn", "kd-animated fadeInDown", "kd-animated fadeInLeft", "kd-animated fadeInRight", "kd-animated fadeInUp", "kd-animated zoomIn") ), "save_always" => true, "admin_label" => true, "description" => esc_html__("Enter animation delay in ms", "keydesign"), "group" => esc_html__( "Extras", "keydesign" ), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Extra class name", "keydesign"), "param_name" => "tcards_extra_class", "value" => "", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", "keydesign"), "group" => esc_html__( "Extras", "keydesign" ), ), ) )); } } public function kd_testimonialcards_container($atts, $content = null) { extract(shortcode_atts(array( 'tcard_title' => '', 'tcard_title_color' => '', 'tcard_nav_style' => '', 'tcard_extra_class' => '', 'tcard_autoplay' => '', 'tcard_autoplay_speed' => '', 'tcard_stoponhover' => '', 'tcard_navigation_color' => '', ), $atts)); $output = ''; $kd_tcardsunique_id = "kd-tcards-".uniqid(); $output .= '
'; $output .= ''; return $output; } public function kd_testimonialcards_single($atts, $content = null) { extract(shortcode_atts(array( 'tcards_author_name' => '', 'tcards_author_name_color' => '', 'tcards_author_job' => '', 'tcards_author_job_color' => '', 'image_source' => '', 'tcards_author_image' => '', 'ext_image' => '', 'ext_image_size' => '', 'tcards_testimonial_text' => '', 'tcards_testimonial_text_color' => '', 'tcards_testimonial_bg_color' => '', 'css_animation' => '', 'elem_animation_delay' => '', 'tcards_extra_class' => '', ), $atts)); $author_img = $tcards_author_img_array = $author_image = $animation_delay = $default_src = $dimensions = $hwstring = $kd_tcardchild_id = $child_wrapper_class = ''; $default_src = vc_asset_url( 'vc/no_image.png' ); $dimensions = vc_extract_dimensions( $ext_image_size ); $hwstring = $dimensions ? image_hwstring( $dimensions[0], $dimensions[1] ) : ''; if ($image_source == 'external_link') { if (!$ext_image) { $author_image .=''.$tcards_author_job.'