HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpamazingsecret/wp-content/plugins_/porto-functionality/elementor/widgets/modal.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Porto Elementor Modal Widget
 *
 * Porto Elementor widget to display a modal dialog.
 *
 * @since 1.7.1
 */

use Elementor\Controls_Manager;

class Porto_Elementor_Modal_Widget extends \Elementor\Widget_Base {

	public function get_name() {
		return 'porto_modal';
	}

	public function get_title() {
		return __( 'Porto Modal Dialog Box', 'porto-functionality' );
	}

	public function get_categories() {
		return array( 'porto-elements' );
	}

	public function get_keywords() {
		return array( 'modal', 'dialog', 'popup box', 'overlay box' );
	}

	public function get_icon() {
		return 'eicon-lightbox-expand';
	}

	protected function register_controls() {

		$this->start_controls_section(
			'section_modal_box',
			array(
				'label' => __( 'Porto Modal Box', 'porto-functionality' ),
			)
		);

		$this->add_control(
			'modal_contain',
			array(
				'label'       => __( 'What\'s in Modal Popup?', 'porto-functionality' ),
				'type'        => Controls_Manager::SELECT,
				'options'     => array(
					'html'    => __( 'Miscellaneous Things', 'porto-functionality' ),
					'youtube' => __( 'Youtube Video', 'porto-functionality' ),
					'vimeo'   => __( 'Vimeo Video', 'porto-functionality' ),
				),
				'default'     => 'html',
				'description' => __( "Please put the embed code in the content for videos, eg: <a href='http://bsf.io/kuv3-' target='_blank'>http://bsf.io/kuv3-</a><br>For hosted video - Add any video with WordPress media uploader or with <a href='https://codex.wordpress.org/Video_Shortcode' target='_blank'>[video]</a> shortcode.", 'porto-functionality' ),
			)
		);

		$this->add_control(
			'youtube_url',
			array(
				'type'      => Controls_Manager::TEXT,
				'label'     => __( 'Youtube URL', 'porto-functionality' ),
				'condition' => array(
					'modal_contain' => 'youtube',
				),
			)
		);

		$this->add_control(
			'vimeo_url',
			array(
				'type'      => Controls_Manager::TEXT,
				'label'     => __( 'Vimeo URL', 'porto-functionality' ),
				'condition' => array(
					'modal_contain' => 'vimeo',
				),
			)
		);

		$this->add_control(
			'content',
			array(
				'type'        => Controls_Manager::WYSIWYG,
				'label'       => __( 'Modal Content', 'porto-functionality' ),
				'description' => __( 'Content that will be displayed in Modal Popup.', 'porto-functionality' ),
				'condition'   => array(
					'modal_contain' => 'html',
				),
			)
		);

		$this->add_control(
			'modal_on',
			array(
				'type'        => Controls_Manager::SELECT,
				'label'       => __( 'Display Modal On -', 'porto-functionality' ),
				'options'     => array(
					'onload'          => __( 'On Page Load', 'porto-functionality' ),
					'image'           => __( 'Image', 'porto-functionality' ),
					'custom-selector' => __( 'Selector', 'porto-functionality' ),
				),
				'default'     => 'onload',
				'description' => __( 'When should the popup be initiated?', 'porto-functionality' ),
			)
		);

		$this->add_control(
			'modal_onload_timeout',
			array(
				'type'      => Controls_Manager::NUMBER,
				'label'     => __( 'Timeout in seconds', 'porto-functionality' ),
				'min'       => 0,
				'max'       => 100,
				'condition' => array(
					'modal_on' => 'onload',
				),
			)
		);

		$this->add_control(
			'modal_on_selector',
			array(
				'type'        => Controls_Manager::TEXT,
				'label'       => __( 'Class and/or ID', 'porto-functionality' ),
				'description' => __( 'Add .Class and/or #ID to open your modal. Multiple ID or Classes separated by comma', 'porto-functionality' ),
				'condition'   => array(
					'modal_on' => 'custom-selector',
				),
			)
		);

		$this->add_control(
			'btn_img',
			array(
				'type'        => Controls_Manager::MEDIA,
				'label'       => __( 'Upload Image', 'porto-functionality' ),
				'description' => __( 'Upload the custom image / image banner.', 'porto-functionality' ),
				'condition'   => array(
					'modal_on' => 'image',
				),
			)
		);

		$this->add_control(
			'modal_style',
			array(
				'type'      => Controls_Manager::SELECT,
				'label'     => __( 'Modal Box Style', 'porto-functionality' ),
				'options'   => array(
					'mfp-fade'       => __( 'Fade', 'porto-functionality' ),
					'my-mfp-zoom-in' => __( 'Zoom in', 'porto-functionality' ),
				),
			)
		);

		$this->add_control(
			'overlay_bg_color',
			array(
				'type'  => Controls_Manager::COLOR,
				'label' => __( 'Overlay Background Color', 'porto-functionality' ),
			)
		);

		$this->add_control(
			'overlay_bg_opacity',
			array(
				'type'        => Controls_Manager::NUMBER,
				'label'       => __( 'Overlay Background Opacity (%)', 'porto-functionality' ),
				'default'     => 80,
				'min'         => 10,
				'max'         => 100,
				'description' => __( 'Select opacity of overlay background.', 'porto-functionality' ),
			)
		);

		$this->add_control(
			'init_extra_class',
			array(
				'type'        => Controls_Manager::TEXT,
				'label'       => __( 'Extra Class (Button/Image)', 'porto-functionality' ),
				'description' => __( 'Provide ex class for this button/image.', 'porto-functionality' ),
				'condition'   => array(
					'modal_on' => 'image',
				),
			)
		);

		$this->add_control(
			'el_class',
			array(
				'type'        => Controls_Manager::TEXT,
				'label'       => __( 'Extra Class', 'porto-functionality' ),
			)
		);

		$this->end_controls_section();
	}

	protected function render() {
		$atts = $this->get_settings_for_display();

		if ( $template = porto_shortcode_template( 'porto_modal' ) ) {
			$content = $atts['content'];
			include $template;
		}
	}
}