esc_html__("Photo gallery", "keydesign"), "description" => esc_html__("Responsive image gallery.", "keydesign"), "base" => "tek_photogallery", "class" => "", "show_settings_on_create" => true, "content_element" => true, "as_parent" => array('only' => 'tek_photogallery_single'), "icon" => plugins_url('assets/element_icons/photo-gallery.png', dirname(__FILE__)), "category" => esc_html__("KeyDesign Elements", "keydesign"), "js_view" => 'VcColumnView', "params" => array( array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Navigation style","keydesign"), "param_name" => "pg_nav_style", "value" => array( "Arrows" => "nav-arrows", "Dots" => "nav-dots", "Arrows and dots" => "nav-arrows-dots", ), "save_always" => true, "description" => esc_html__("Select navigation style.", "keydesign"), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Enable autoplay","keydesign"), "param_name" => "pg_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" => "pg_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" => "pg_autoplay", "value" => array("auto_on") ), "description" => esc_html__("Select autoplay speed.", "keydesign") ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Stop on hover","keydesign"), "param_name" => "pg_stoponhover", "value" => array( "Off" => "hover_off", "On" => "hover_on" ), "save_always" => true, "dependency" => array( "element" => "pg_autoplay", "value" => array("auto_on") ), "description" => esc_html__("Stop sliding on mouse over.", "keydesign") ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Enable loop","keydesign"), "param_name" => "pg_enable_loop", "value" => array( "Off" => "loop_off", "On" => "loop_on", ), "save_always" => true, "description" => esc_html__("Infinity loop. Duplicate last and first items to get loop illusion.", "keydesign"), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Transparent inactive items","keydesign"), "param_name" => "pg_transparent_opt", "value" => array( "Enable" => "enable-transparent-items", "Disable" => "disable-transparent-items", ), "save_always" => true, "description" => esc_html__("Set a transparency layer to inactive carousel items.", "keydesign"), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Extra class name", "keydesign"), "param_name" => "extra_class", "value" => "", "description" => esc_html__("If you wish to style this 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" ), ), array( 'type' => 'css_editor', 'heading' => esc_html__( 'Css', 'keydesign' ), 'param_name' => 'css', 'group' => esc_html__( 'Design options', 'keydesign' ), ), ) )); // Shortcode configuration vc_map(array( "name" => __("Child image", "keydesign"), "base" => "tek_photogallery_single", "content_element" => true, "as_child" => array('only' => 'tek_photogallery'), "icon" => plugins_url('assets/element_icons/child-image.png', dirname(__FILE__)), "params" => array( array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Image source", "keydesign"), "param_name" => "pg_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__("Image", "keydesign"), "param_name" => "pg_image", "value" => "", "description" => esc_html__("Select or upload a image using the media library.", "keydesign"), "dependency" => array( "element" => "pg_image_source", "value" => array("media_library"), ), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Image external source", "keydesign"), "param_name" => "pg_ext_image", "value" => "", "description" => esc_html__("Enter image external link.", "keydesign"), "dependency" => array( "element" => "pg_image_source", "value" => array("external_link"), ), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Image size", "keydesign"), "param_name" => "pg_image_size", "value" => "", "description" => esc_html__("Enter image size in pixels. Example: 650x450 (Width x Height).", "keydesign"), "dependency" => array( "element" => "pg_image_source", "value" => array("external_link"), ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("On click action", "keydesign"), "param_name" => "pg_click_action", "value" => array( "None" => "click_action_none", "Open PhotoSwipe" => "open_photoswipe", "Open custom link" => "custom_link", ), "description" => esc_html__("Select action for click action.", "keydesign"), "save_always" => true, ), array( "type" => "href", "class" => "", "heading" => esc_html__("Image link", "keydesign"), "param_name" => "pg_image_link", "value" => "", "description" => esc_html__("Enter URL if you want this image to have a link (Note: parameters like \"mailto:\" are also accepted).", "keydesign"), "dependency" => array( "element" => "pg_click_action", "value" => array("custom_link"), ), ), array( 'type' => 'dropdown', 'heading' => __( 'Link Target', 'keydesign' ), 'param_name' => 'pg_link_target', "value" => array( esc_html__( 'Same window', 'keydesign' ) => '_self', esc_html__( 'New window', 'keydesign' ) => '_blank', ), 'dependency' => array( 'element' => 'pg_click_action', 'value' => array('custom_link'), ), ), ) )); } } public function kd_photogallery_container($atts, $content = null) { // Declare empty vars $output = $photo_gallery_id = $pg_wrapper_class = ''; extract(shortcode_atts(array( 'pg_nav_style' => '', 'pg_autoplay' => '', 'pg_autoplay_speed' => '', 'pg_stoponhover' => '', 'pg_enable_loop' => '', 'pg_transparent_opt' => '', 'extra_class' => '', 'css' => '', ), $atts)); $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ) ); $photo_gallery_id = "kd-photo-gallery-".uniqid(); $pg_wrapper_class = implode(' ', array('photo-gallery-wrapper', $pg_transparent_opt, $photo_gallery_id, $pg_nav_style, $extra_class, $css_class)); $output .= '