| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- /*------------------------------------------------------*/
- /* taskereasy Heading
- /*------------------------------------------------------*/
- vc_map(array(
- "name" => esc_html__("Clients", 'taskereasy'),
- "base" => "taskereasy_logo_carousel",
- 'icon' => get_template_directory_uri() . '/assets/images/favicon-icon/shortcode-icon.png',
- "class" => "",
- "description" => esc_html__("Add taskereasy client logo carousel", 'taskereasy'),
- "category" => esc_html__('Taskereasy Shortcodes', 'taskereasy'),
- "params" => array(
- array(
- "type" => "attach_images",
- "heading" => esc_html__("Images", 'taskereasy'),
- "param_name" => "images",
- ),
- array(
- 'type' => 'css_editor',
- 'heading' => esc_html__( 'CSS', 'taskereasy' ),
- 'param_name' => 'custom_design',
- 'group' => esc_html__( 'Design options', 'taskereasy' ),
- )
- )
- ));
- add_shortcode( 'taskereasy_logo_carousel', function($atts, $content = null) {
- extract(shortcode_atts(array(
- 'images' => '',
- 'custom_design' => '',
- ), $atts));
- $custom_design = vc_shortcode_custom_css_class( $custom_design, ' ' );
- $image_ids = explode(',', $images);
- $image_no = 1;
- $output = '';
- $output .=' <div id="partners">
- <div class="partners-logo">
- <div class="owl-carousel">';
- foreach( $image_ids as $image_id ){
- $images = wp_get_attachment_image_src( $image_id, 'thumbnail' );
- $output .=' <div class="item"> <img src="'.esc_url($images[0]).'" alt="image"> </div>';
- $image_no++;
- }
- $output .=' </div></div>
- </div>';
- return $output;
- });
|