"Advanced Service Box", "category" => 'Advanced Elements', "description" => "Service box with nice styles", "base" => "awavc_serv_box_two", "class" => "", "icon" => "advc_service_ico", "params" => array( array( "type" => "dropdown", "class" => "", "heading" => __("Service Box Style:", "awavcl"), "param_name" => "servive_box_style", "value" => array( __("Box style 1","awavcl") => 'boxvd2', __("Box style 2","awavcl") => 'boxvd3', __("Box style 3","awavcl") => 'boxvd5', __("Box style 4","awavcl") => 'boxvd6', __("Box style 5","awavcl") => 'boxvd7', __("Box style 6","awavcl") => 'boxvd8', ), "admin_label" => true, //"std" => "boxvd2", ), array( "type" => "attach_image", "heading" => __("Image", "awavcl"), "param_name" => "image", "value" => "", "description" => __("", "awavcl"), ), array( "type" => "textfield", "heading" => __("Title", 'awavcl'), "param_name" => "title", "description" => __("", 'awavcl'), "value" => __("Title", 'awavcl'), ), array( "type" => "textarea", "heading" => __("Description", 'awavcl'), "param_name" => "desc", "description" => __("", 'awavcl'), "value" => __("Description", 'awavcl'), ), array( "type" => "textfield", "heading" => __("Button Text", 'awavcl'), "param_name" => "btn_txt", "description" => __("", 'awavcl'), "value" => __("Button", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd3", ), ), array( "type" => "textfield", "heading" => __("Button Text", 'awavcl'), "param_name" => "btn_txt1", "description" => __("", 'awavcl'), "value" => __("Button", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd6", ), ), array( "type" => "textfield", "heading" => __("Button Text", 'awavcl'), "param_name" => "btn_txt2", "description" => __("", 'awavcl'), "value" => __("Button", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd7", ), ), array( 'type' => 'param_group', 'heading' => __( 'List Items Below Content', 'awavcl' ), 'param_name' => 'services_lists', "dependency" => array( "element" => "servive_box_style", "value" => "boxvd8", ), 'params' => array( array( 'type' => 'textfield', 'heading' => __( 'Service List', 'awavcl' ), 'param_name' => 'list_content', 'description' => __( '', 'awavcl' ), 'value' => 'Consultation', ), ), ), array( "type" => "textfield", "class" => "", "heading" => __( "Link", "awavcl" ), "param_name" => "service_link", "value" => '', "description" => __( "If you don/'t want to link, Leave it empty", "my-text-domain" ) ), array( "type" => "textfield", "heading" => esc_attr__("Extra class name", 'awavcl'), "param_name" => "el_class", "description" => esc_attr__("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.", 'awavcl'), ), array( "type" => "iconpicker", "heading" => __("Front Icon", "awavcl"), "param_name" => "font_icon1", "value" => "fa fa-handshake-o", "group" => "Icon", "dependency" => array( "element" => "servive_box_style", "value" => "boxvd5", ), ), array( "type" => "iconpicker", "heading" => __("Icon On Hover", "awavcl"), "param_name" => "font_icon2", "value" => "fa fa-handshake-o", "group" => "Icon", "dependency" => array( "element" => "servive_box_style", "value" => "boxvd5", ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Icon Size', 'awavcl' ), 'param_name' => 'icon_size', "value" => 50, "min" => 5, "max" => 100, "step" => 1, "unit" => "px", "description" => __("Choose Title Font Size as Pixel. Default is 26px", "awavcl"), "group" => __("Icon", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd5", ), ), array( "type" => "colorpicker", "heading" => __("Icon Color", 'awavcl'), "param_name" => "icon_color", "value" => "red", "group" => __("Icon", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd5", ), ), array( "type" => "iconpicker", "heading" => __("Front Icon", "awavcl"), "param_name" => "font_icon3", "value" => "fa fa-handshake-o", "group" => "Icon", "dependency" => array( "element" => "servive_box_style", "value" => "boxvd6", ), ), array( "type" => "iconpicker", "heading" => __("Icon On Hover", "awavcl"), "param_name" => "font_icon4", "value" => "fa fa-handshake-o", "group" => "Icon", "dependency" => array( "element" => "servive_box_style", "value" => "boxvd6", ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Icon Size', 'awavcl' ), 'param_name' => 'icon_size1', "value" => 50, "min" => 5, "max" => 100, "step" => 1, "unit" => "px", "description" => __("Choose Title Font Size as Pixel. Default is 26px", "awavcl"), "group" => __("Icon", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd6", ), ), array( "type" => "colorpicker", "heading" => __("Icon Color", 'awavcl'), "param_name" => "icon_color1", "value" => "red", "group" => __("Icon", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd6", ), ), array( "type" => "iconpicker", "heading" => __("Icon On Hover", "awavcl"), "param_name" => "font_icon5", "value" => "fa fa-handshake-o", "group" => "Icon", "dependency" => array( "element" => "servive_box_style", "value" => "boxvd7", ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Icon Size', 'awavcl' ), 'param_name' => 'icon_size2', "value" => 50, "min" => 5, "max" => 100, "step" => 1, "unit" => "px", "description" => __("Choose Title Font Size as Pixel. Default is 26px", "awavcl"), "group" => __("Icon", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd7", ), ), array( "type" => "colorpicker", "heading" => __("Icon Color", 'awavcl'), "param_name" => "icon_color2", "value" => "", "group" => __("Icon", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd7", ), ), array( 'type' => 'prime_slider', 'heading' => __( 'Title Font Size', 'awavcl' ), 'param_name' => 'title_f_size', "value" => 20, "min" => 5, "max" => 100, "step" => 1, "unit" => "px", "description" => __("Choose Title Font Size as Pixel. Default is 26px", "awavcl"), "group" => __("Settings", 'awavcl'), ), array( "type" => "dropdown", "class" => "", "heading" => __("Title Font style", "awavcl"), "param_name" => "title_f_style", "value" => array( __("Normal","awavcl") => "", __("Italic","awavcl") => "italic", ), "group" => __("Settings", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Description Font Size', 'awavcl' ), 'param_name' => 'desc_f_size', "value" => 14, "min" => 5, "max" => 100, "step" => 1, "unit" => "px", "description" => __("Choose Description Font Size as Pixel. Default is 14px", "awavcl"), "group" => __("Settings", 'awavcl'), ), array( "type" => "dropdown", "class" => "", "heading" => __("Description Font style", "awavcl"), "param_name" => "desc_f_style", "value" => array( __("Normal","awavcl") => "", __("Italic","awavcl") => "italic", ), "group" => __("Settings", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Background Color", 'awavcl'), "param_name" => "bg_color", "value" => "red", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Background Color On Hover", 'awavcl'), "param_name" => "bg_color_hvr", "value" => "red", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Title Color", 'awavcl'), "param_name" => "ttl_color", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Description Color", 'awavcl'), "param_name" => "desc_color", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Button Text Color", 'awavcl'), "param_name" => "btn_text_clr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd3", ), ), array( "type" => "colorpicker", "heading" => __("Button Background Color", 'awavcl'), "param_name" => "btn_bg_clr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd3", ), ), array( "type" => "colorpicker", "heading" => __("Button Background Color on Hover", 'awavcl'), "param_name" => "btn_bg_hvr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd3", ), ), array( "type" => "colorpicker", "heading" => __("Button Text Color", 'awavcl'), "param_name" => "btn_text_clr1", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd6", ), ), array( "type" => "colorpicker", "heading" => __("Button Background Color", 'awavcl'), "param_name" => "btn_bg_clr1", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd6", ), ), array( "type" => "colorpicker", "heading" => __("Button Background Color on Hover", 'awavcl'), "param_name" => "btn_bg_hvr1", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd6", ), ), array( "type" => "colorpicker", "heading" => __("Button Text Color", 'awavcl'), "param_name" => "btn_text_clr2", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd7", ), ), array( "type" => "colorpicker", "heading" => __("Button Background Color", 'awavcl'), "param_name" => "btn_bg_clr2", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd7", ), ), array( "type" => "colorpicker", "heading" => __("Button Background Color on Hover", 'awavcl'), "param_name" => "btn_bg_hvr2", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( "element" => "servive_box_style", "value" => "boxvd7", ), ), array( "type" => "colorpicker", "heading" => __("Text Color on Hover", 'awavcl'), "param_name" => "txt_hvr_color", "value" => "", "group" => __("Colors", 'awavcl'), ), ) )); function awavc_serv_box_two_shortcode($atts, $content = null) { extract(shortcode_atts(array( //'show_btnnnn' => 'Yes', 'servive_box_style' => 'boxvd2', 'image' => '', 'title' => 'Title', 'desc' => 'Awesome way to show your features inside wpbakery page builder.', 'service_link' => '', 'open_tab' => '', 'img_hite' => '', 'img_wid' => '', 'brdr_dadius' => '', 'title_f_size' =>'', 'title_f_style' =>'', 'desc_f_size' =>'', 'desc_f_size' =>'', 'desc_f_style' =>'', 'bg_color' =>'', 'bg_color_hvr' =>'', 'ttl_color' =>'', 'desc_color' =>'', 'txt_hvr_color' =>'', 'btn_txt' =>'Learn More', 'btn_text_clr' =>'', 'btn_bg_clr' =>'', 'btn_bg_hvr' =>'', 'font_icon1' =>'fa fa-home', 'font_icon2' =>'fa fa-home', 'icon_size' =>'', 'icon_color' =>'', 'font_icon3' =>'', 'font_icon4' =>'', 'font_icon5' =>'', 'icon_size1' =>'', 'icon_size2' =>'', 'icon_color1' =>'', 'icon_color2' =>'', 'btn_txt1' =>'', 'btn_text_clr1' =>'', 'btn_bg_clr1' =>'', 'btn_bg_hvr1' =>'', 'btn_txt2' =>'', 'btn_text_clr2' =>'', 'btn_bg_clr2' =>'', 'btn_bg_hvr2' =>'', 'services_lists' =>'', 'el_class' =>'', ), $atts)); //$image_url = wp_get_attachment_url( $image, 'full' ); //$image = aq_resize( $image_url, 296, 289, false ); //resize & crop the image //var_dump($image); $image = wp_get_attachment_image_src( $image, 'full' ); $html = ''; $list_html = ''; $services_lists = vc_param_group_parse_atts($services_lists); if($servive_box_style == "boxvd8"){ foreach ($services_lists as $services_list) { $list_html .= '
  • '.$services_list['list_content'].'
  • '; } } if($servive_box_style == "boxvd2") { $add_class = (rand(99,99999)); $html .= '

    '.$title.'

    '.$desc.'

    '; } if($servive_box_style == 'boxvd3') { $add_class = (rand(99,99999)); $html .= '

    '.$title.'

    '.$desc.'
    '; if(!empty($btn_txt)) { $html .= ''.$btn_txt.''; } $html .= '
    '; } if($servive_box_style == 'boxvd5') { $add_class = (rand(99,99999)); $html .= '

    '.$title.'

    '.$desc.'

    '; } if($servive_box_style == 'boxvd6') { $add_class = (rand(99,99999)); $html .= '

    '.$title.'

    '.$desc.'

    '; if(!empty($btn_txt1)) { $html .= ''.$btn_txt1.' '; } $html .= '
    '; } if($servive_box_style == 'boxvd7') { $add_class = (rand(99,99999)); $html .= '
    '.$desc.'
    '; } if($servive_box_style == 'boxvd8') { $add_class = (rand(99,9999)); $add_ttl = (rand(99,99999)); $add_li = (rand(99,999999)); $html .= '
    '.$title.'

      '.$desc.'

      '.$list_html.'
    '; } return $html; } add_shortcode("awavc_serv_box_two", "awavc_serv_box_two_shortcode");