HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/lacalita/wp-content/plugins/rey-core/inc/elementor/custom/video.php
<?php
namespace ReyCore\Elementor\Custom;

if (!defined('ABSPATH')) exit; // Exit if accessed directly

class Video {

	function __construct(){

		add_action( 'elementor/element/video/section_video_style/before_section_end', [$this, 'icon_settings'], 10);
		add_action( 'elementor/frontend/widget/before_render', [$this, 'before_render'], 10);

	}

	/**
	* Render some attributes before rendering
	*
	* @since 1.0.0
	**/
	function before_render( $element )
	{

		if( 'video' !== $element->get_unique_name() ){
			return;
		}

		$settings = $element->get_data('settings');

		if( isset($settings['play_icon_icon']) && $settings['play_icon_icon'] !== '' ){
			reycore_assets()->add_styles('reycore-elementor-el-video');
		}

	}

	/**
	 * Add custom settings into Elementor's Section
	 *
	 * @since 1.0.0
	 */
	function icon_settings( $element )
	{
		$element->start_injection( [
			'of' => 'play_icon_color',
		] );

		$element->add_control(
			'play_icon_icon',
			[
				'label' => __( 'Play Icon Type', 'rey-core' ),
				'type' => \Elementor\Controls_Manager::SELECT,
				'default' => '',
				'options' => [
					''  => __( 'Default (play circle)', 'rey-core' ),
					'caret'  => __( 'Caret right', 'rey-core' ),
					'chevron'  => __( 'Chevron right', 'rey-core' ),
					'play'  => __( 'Play icon', 'rey-core' ),
					'yt'  => __( 'Youtube Play icon', 'rey-core' ),
				],
				'prefix_class' => 'rey-video-iconType-'
			]
		);

		$element->end_injection();


	}

}