Parcourir la source

Fixed slider first item not appearing

Moritz Schmidt il y a 9 ans
Parent
commit
4a648fd0fc
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      functions.php

+ 2 - 1
functions.php

@@ -647,9 +647,10 @@ function carousel_shortcode_func($atts) {
   if($a['id'] != NULL && array_key_exists($a['id'], $tdaSlider)) {
     $slider = $tdaSlider[$a['id']];
 
+
     $output = '<div class="owl-carousel">';
     foreach($slider as $key => $value) {
-      if($key == "url") {
+      if($key === "url") {
         continue;
       }
       $output .= '<div class="item" id="item-' . $key . '"><img id="img-' . $key . '" data-lazy="' . str_replace("\xc2\xad", "", $slider['url'] . $value) . '" style="height: 300px; width: auto;"></div>' . PHP_EOL;