Advertisement
urosevic

Carousel Anything for Visual Composer v1.5: Validation fix

Aug 7th, 2015
254
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Plugin: Carousel Anything for Visual Composer
  3.  * Version: 1.5
  4.  * Fix by: Aleksandar Urosevic - http://urosevic.net
  5.  * File: vc-carousel-anything.php
  6.  * Line: #567
  7.  */
  8.  
  9. // Original code that reproduce HTML quality check error "No space between attributes."
  10. $ret .= '<div id="' . esc_attr( $id ) . '" class="carousel-anything-container owl-carousel' . $carousel_class . '"data-items="' . esc_attr( $atts['items'] ) . '"data-scroll_per_page="' . esc_attr( $atts['scroll_per_page'] ) . '"data-autoplay="' . esc_attr( empty( $atts['autoplay'] ) || $atts['autoplay'] == '0' ? 'false' : $atts['autoplay'] ) . '"data-items-small="' . esc_attr( $atts['items_desktop_small'] ) . '"data-items-tablet="' . esc_attr( $atts['items_tablet'] ) . '"data-items-mobile="' . esc_attr( $atts['items_mobile'] ) . '"data-stop-on-hover="' . esc_attr( $atts['stop_on_hover'] ) . '"data-speed-scroll="' . esc_attr( $atts['speed_scroll'] ) . '"data-speed-rewind="' . esc_attr( $atts['speed_rewind'] ) . '"data-thumbnails="' . esc_attr( $atts['thumbnails'] ) . '"data-thumbnail-numbers="' . esc_attr( $atts['thumbnail_numbers'] ) . '"data-navigation="' . esc_attr( $navigation_buttons ? 'true' : 'false' ) . '"data-touchdrag="' . esc_attr( $atts['touchdrag'] ? 'true' : 'false' ) . '">';
  11.  
  12. // Modified code that fix this issue
  13. $ret .= '<div id="' . esc_attr( $id ) . '" class="carousel-anything-container owl-carousel' . $carousel_class . '" data-items="' . esc_attr( $atts['items'] ) . '" data-scroll_per_page="' . esc_attr( $atts['scroll_per_page'] ) . '" data-autoplay="' . esc_attr( empty( $atts['autoplay'] ) || $atts['autoplay'] == '0' ? 'false' : $atts['autoplay'] ) . '" data-items-small="' . esc_attr( $atts['items_desktop_small'] ) . '" data-items-tablet="' . esc_attr( $atts['items_tablet'] ) . '" data-items-mobile="' . esc_attr( $atts['items_mobile'] ) . '" data-stop-on-hover="' . esc_attr( $atts['stop_on_hover'] ) . '" data-speed-scroll="' . esc_attr( $atts['speed_scroll'] ) . '" data-speed-rewind="' . esc_attr( $atts['speed_rewind'] ) . '" data-thumbnails="' . esc_attr( $atts['thumbnails'] ) . '" data-thumbnail-numbers="' . esc_attr( $atts['thumbnail_numbers'] ) . '" data-navigation="' . esc_attr( $navigation_buttons ? 'true' : 'false' ) . '" data-touchdrag="' . esc_attr( $atts['touchdrag'] ? 'true' : 'false' ) . '">';
Advertisement
RAW Paste Data Copied
Advertisement