array( 'name' => __( 'Single Image', 'cyber' ), 'title' => 'Em Image Slider Image', 'icon' => 'fa-photo', 'category' => 'cyber', 'wrapper_class' => 'clearfix', 'description' => __( 'Display Image style. This Elemement Only use for EM Image Slider.', 'cyber' ), 'params' => array( 'general' => array( array( 'type' => 'toggle', 'label' => esc_html__( 'Set Image', 'cyber' ), 'name' => 'show_img', 'value' => 'yes', 'description' => esc_html__( 'you can show/hide image option.', 'cyber' ) ), array( 'type' => 'attach_image', 'name' => 'image', 'label' => esc_html__( 'Image', 'cyber' ), 'description' => esc_html__( 'Select image display For BG', 'cyber' ), 'relation' => array( 'parent' => 'show_img', 'show_when' => 'yes' ) ), array( 'type' => 'text', 'label' => __( 'Custom class', 'cyber' ), 'name' => 'custom_class', 'description' => __( 'Enter extra custom class', 'cyber' ) ) ), ) ), )// first array ); // End add map endif; } endif; /** * ======================================================= * Register Shortcode banner_slider section * ======================================================= */ // [em_image_slide title="" desc="" custom_css_class=""] if(!function_exists('em_image_slide_function')){ function em_image_slide_function($atts,$content){ ob_start(); $em_image_slide = shortcode_atts(array( 'show_img' => '', 'image' => '', 'custom_css' => '', 'custom_class' => '', ),$atts); extract( $em_image_slide ); //custom class $wrap_class = apply_filters( 'kc-el-class', $atts ); if( !empty( $custom_class ) ): $wrap_class[] = $custom_class; endif; $extra_class = implode( ' ', $wrap_class ); $images=""; $images = wp_get_attachment_image_src( $image, 'full'); ?>