| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?php
- /*------------------------------------------------------*/
- /* taskereasy Heading
- /*------------------------------------------------------*/
- vc_map(array(
- "name" => esc_html__("Static Logos", 'taskereasy'),
- "base" => "taskereasy_logos",
- 'icon' => get_template_directory_uri() . '/assets/images/favicon-icon/shortcode-icon.png',
- "class" => "",
- "description" => esc_html__("Add taskereasy logos", 'taskereasy'),
- "category" => esc_html__('Taskereasy Shortcodes', 'taskereasy'),
- "params" => array(
- array(
- "type" => "dropdown",
- "heading" => esc_html__("Style", 'taskereasy'),
- "param_name" => "style",
- "value" => array('Style 1' => 'style_1', 'Style 2' => 'style_2'),
- ),
- array(
- "type" => "attach_images",
- "heading" => esc_html__("Images", 'taskereasy'),
- "param_name" => "images",
- ),
- array(
- "type" => "textfield",
- "heading" => esc_html__("Title", 'taskereasy'),
- "param_name" => "title",
- "dependency" => array(
- "element" => "style",
- "value" => "style_2"
- ),
- ),
- array(
- "type" => "textarea_safe",
- "heading" => esc_html__("Subtitle", 'taskereasy'),
- "param_name" => "subtext",
- "dependency" => array(
- "element" => "style",
- "value" => "style_2"
- ),
- ),
- array(
- 'type' => 'css_editor',
- 'heading' => esc_html__( 'CSS', 'taskereasy' ),
- 'param_name' => 'custom_design',
- 'group' => esc_html__( 'Design options', 'taskereasy' ),
- )
- )
- ));
- add_shortcode( 'taskereasy_logos', function($atts, $content = null) {
- extract(shortcode_atts(array(
- 'style' => 'style_1',
- 'images' => '',
- 'title' => '',
- 'subtext' => '',
- 'custom_design' => '',
- ), $atts));
- $custom_design = vc_shortcode_custom_css_class( $custom_design, ' ' );
- $image_ids = explode(',', $images);
- $image_no = 1;
- $output = '';
- if($style == "style_1"){
- $output .='
- <div id="our-clients">
- <ul class="'.$custom_design.'">';
- foreach( $image_ids as $image_id ){
- $images = wp_get_attachment_image_src( $image_id, 'thumbnail' );
- $output .=' <li><img src="'.esc_url($images[0]).'" alt="image"></li>';
- $image_no++;
- }
- $output .=' </ul>
- </div>';
- }else{
- $output.=
- '<div class="partners-logo3">
- <div class="row">
- <div class="col col-12 col-lg-3 col-md-4">
- <div class="partner-title-wrpr">
- <h3 class="partner-title">'.$title.'</h3>
- <p>'.$subtext.'</p>
- </div>
- </div>
- <div class="col col-12 col-lg-9 col-md-8">
- <div class="row partner-logo3-inner">';
- foreach( $image_ids as $image_id ){
- $images = wp_get_attachment_image_src( $image_id, 'thumbnail' );
- $output.=
- '<div class="col col-12 col-md-3">
- <div class="partner-img-wrpr">
- <img src="'.esc_url($images[0]).'" alt="PARTNERS LOGO">
- </div>
- </div>';
- $image_no++;
- }
- $output.='
- </div>
- </div>
- </div>
- </div>';
- }
- return $output;
- });
|