SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/video_playlist.php

  1. <?php
  2. use Sprout\Helpers\Enc;
  3. use Sprout\Helpers\Needs;
  4. use Sprout\Helpers\Url;
  5.  
  6.  
  7. Needs::fileGroup('magnific_popup');
  8. Needs::fileGroup('video_gallery');
  9. ?>
  10.  
  11. <?php if (!empty($videos) and count($videos) > 0): ?>
  12. <ul class="video-gallery -clearfix video-gallery--cols-<?php echo Enc::html($thumb_rows); ?>">
  13. <?php foreach ($videos as $video): ?>
  14. <li class="video-gallery__item">
  15. <a href="<?php echo Enc::html(Url::addUrlScheme('www.youtube.com/watch?v=' . $video['id'])); ?>">
  16. <img src="<?php echo Enc::html($video['thumb_url']); ?>" alt="<?php echo Enc::html($video['title']); ?>">
  17. </a>
  18. <?php if ($captions): ?>
  19. <p class="video-gallery__item__caption"><?php echo Enc::html($video['title']); ?></p>
  20. <?php endif; ?>
  21. </li>
  22. <?php endforeach; ?>
  23. </ul>
  24. <?php endif; ?>
  25.