"Advanced Testimonial Box", "category" => 'Advanced Elements', "description" => "What's client says in styles", "base" => "awavc_testimonial_box", "class" => "", "icon" => "advc_testi_icon", "params" => array( array( "type" => "dropdown", "class" => "", "heading" => __("Testimonial Box Style:", "awavcl"), "param_name" => "testi_box_style", "value" => array( __("style 1","awavcl") => 'testi_style_1', __("style 2","awavcl") => 'testi_style_2', __("style 3","awavcl") => 'testi_style_3', __("style 4","awavcl") => 'testi_style_4', __("style 5","awavcl") => 'testi_style_5', __("style 6","awavcl") => 'testi_style_6', ), "admin_label" => true, ), array( "type" => "attach_image", "heading" => __("Image", "awavcl"), "param_name" => "image", "value" => "", "description" => __("Choose your image icon::60*60", "awavcl"), ), array( "type" => "textfield", "heading" => __("Title", 'awavcl'), "param_name" => "title", "description" => __("", 'awavcl'), "value" => __("Title", 'awavcl'), ), array( "type" => "textarea", "heading" => __("Comment", 'awavcl'), "param_name" => "desc", "description" => __("", 'awavcl'), "value" => __("Description", 'awavcl'), ), array( "type" => "textarea", "heading" => __("Position", 'awavcl'), "param_name" => "position", "description" => __("", 'awavcl'), "value" => __("Position", 'awavcl'), ), array( "type" => "dropdown", "class" => "", "heading" => __("Rating Stared", "awavcl"), "param_name" => "rating_star", "value" => array( __("0 Star","awavcl") => '', __("1 Star","awavcl") => 'adts_testimonial__rating--1', __("2 Star","awavcl") => 'adts_testimonial__rating--2', __("3 Star","awavcl") => 'adts_testimonial__rating--3', __("4 Star","awavcl") => 'adts_testimonial__rating--4', __("5 Star","awavcl") => 'adts_testimonial__rating--5', ), "dependency" => array("element" => "testi_box_style", "value" => "testi_style_1",), ), array( "type" => "dropdown", "class" => "", "heading" => __("Rating Stared", "awavcl"), "param_name" => "rating_star_2", "value" => array( __("0 Star","awavcl") => '', __("1 Star","awavcl") => 'adts2_testimonial__rating--1', __("2 Star","awavcl") => 'adts2_testimonial__rating--2', __("3 Star","awavcl") => 'adts2_testimonial__rating--3', __("4 Star","awavcl") => 'adts2_testimonial__rating--4', __("5 Star","awavcl") => 'adts2_testimonial__rating--5', ), "dependency" => array("element" => "testi_box_style", "value" => "testi_style_2",), ), /*array( 'type' => 'param_group', 'heading' => __( 'List Items Below Content', 'awavcl' ), 'param_name' => 'services_lists', 'params' => array( array( 'type' => 'textfield', 'heading' => __( 'Service List', 'awavcl' ), 'param_name' => 'list_content', 'description' => __( '', 'awavcl' ), 'value' => 'Consultation', ), ), ),*/ array( 'type' => 'prime_slider', 'heading' => __( 'Title Font Size', 'awavcl' ), 'param_name' => 'title_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_style", "value" => array( __("Normal","awavcl") => "", __("Italic","awavcl") => "italic", ), "group" => __("Settings", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Description Font Size', 'awavcl' ), 'param_name' => 'desc_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_style", "value" => array( __("Normal","awavcl") => "", __("Italic","awavcl") => "italic", ), "group" => __("Settings", 'awavcl'), ), array( 'type' => 'prime_slider', 'heading' => __( 'Position Font Size', 'awavcl' ), 'param_name' => 'position_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" => __("Position Font Style", "awavcl"), "param_name" => "position_style", "value" => array( __("Normal","awavcl") => "", __("Italic","awavcl") => "italic", ), "group" => __("Settings", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Background Color", 'awavcl'), "param_name" => "bg_color", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Background Color 2", 'awavcl'), "param_name" => "bg_color1", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "testi_box_style", 'value' => array('testi_style_4','testi_style_6') ), ), array( "type" => "colorpicker", "heading" => __("Title Color", 'awavcl'), "param_name" => "ttl_color", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Comment Color", 'awavcl'), "param_name" => "descrip_color", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Position Color", 'awavcl'), "param_name" => "pos_color", "value" => "", "group" => __("Colors", 'awavcl'), ), array( "type" => "colorpicker", "heading" => __("Qoute Color", 'awavcl'), "param_name" => "bg_color_hvr", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "testi_box_style", 'value' => "testi_style_3" ), ), array( "type" => "colorpicker", "heading" => __("Rating Color", 'awavcl'), "param_name" => "rating_color", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "testi_box_style", 'value' => array('testi_style_2', 'testi_style_1') ), ), array( "type" => "colorpicker", "heading" => __("Border Color", 'awavcl'), "param_name" => "brdr_color", "value" => "", "group" => __("Colors", 'awavcl'), "dependency" => array( 'element' => "testi_box_style", 'value' => array('testi_style_5','testi_style_4','testi_style_3','testi_style_2') ), ), array( 'type' => 'vc_link', 'heading' => __( 'Customer Link', 'awavcl' ), 'param_name' => 'customer_link', 'description' => __( '', 'awavcl' ), 'value' => '#', "dependency" => array( 'element' => "testi_box_style", 'value' => array('testi_style_4') ), ), 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'), ), ) )); function awavc_testimonial_box_shortcode($atts, $content = null) { extract(shortcode_atts(array( //'show_btnnnn' => 'Yes', 'testi_box_style' => 'testi_style_1', 'image' => '', 'title' => 'Title', 'desc' => 'Awesome way to show your features inside wpbakery page builder.', 'position' => 'AFO-INCOP', 'rating_star' => '', 'rating_star_2' => '', 'title_size' => '', 'title_style' => '', 'desc_size' => '', 'desc_style' => '', 'el_class' =>'', 'position_size' =>'', 'position_style' =>'', 'bg_color' =>'', 'bg_color1' =>'', 'bg_color_hvr' =>'', 'ttl_color' =>'', 'descrip_color' =>'', 'pos_color' =>'', 'services_lists' =>'', 'rating_color' =>'', 'brdr_color' =>'', 'customer_link' =>'', ), $atts)); wp_register_style( 'testimonial-css', plugins_url( '/css/style-testimonial.css', __FILE__) ); wp_enqueue_style( 'testimonial-css' ); //$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 = ''; $customer_link = vc_build_link( $customer_link); if($testi_box_style == 'testi_style_1') { $add_class = (rand(99,9999)); $html .= '

'.$desc.'

'.$title.'

'.$position.'
'; } if($testi_box_style == 'testi_style_2') { $add_class = (rand(99,9999)); $html .= '

'.$desc.'

'.$title.'

'.$position.'
'; } if($testi_box_style == 'testi_style_3') { $add_class = (rand(99,9999)); $html .= '

'.$title.'

'.$position.'

'.$desc.'

'; } if($testi_box_style == 'testi_style_4') { $add_class = (rand(99,9999)); $html .= '

'.$desc.'

'.$title.'
'.$position.' - '.$customer_link['title'].'
'; } if($testi_box_style == 'testi_style_5') { $add_class = (rand(99,9999)); $html .= '
"'.$desc.'"
'.$title.''.$position.'
'; } if($testi_box_style == 'testi_style_6') { $add_class = (rand(99,9999)); $html .= '
'.$desc.'
sample3
'.$title.'- '.$position.'
'; } return $html; } add_shortcode("awavc_testimonial_box", "awavc_testimonial_box_shortcode");