Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/wp-content/plugins/deeds-plugin/elementor/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/wp-content/plugins/deeds-plugin/elementor/template.php

<?php

namespace deedsPLUGIN\Element;

use Elementor\Controls_Manager;
use Elementor\Controls_Stack;
use Elementor\Group_Control_Typography;
use Elementor\Core\Schemes\Typography;
use Elementor\Core\Schemes\Color;
use Elementor\Group_Control_Border;
use Elementor\Repeater;

/**
 * Elementor button widget.
 * Elementor widget that displays a button with the ability to control every
 * aspect of the button design.
 *
 * @since 1.0.0
 */
class Template extends \Elementor\Widget_Base {

	/**
	 * Get widget name.
	 * Retrieve button widget name.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'deeds_elementor_template';
	}

	/**
	 * Get widget title.
	 * Retrieve button widget title.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return string Widget title.
	 */
	public function get_title() {
		return esc_html__( 'Elementor Template', 'fixkar' );
	}

	/**
	 * Get widget icon.
	 * Retrieve button widget icon.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return 'eicon-pencil';
	}

	/**
	 * Get widget categories.
	 * Retrieve the list of categories the button widget belongs to.
	 * Used to determine where to display the widget in the editor.
	 *
	 * @since  2.0.0
	 * @access public
	 * @return array Widget categories.
	 */
	public function get_categories() {
		return [ 'webinane' ];
	}


	/**
	 * Register button widget controls.
	 * Adds different input fields to allow the user to change and customize the widget settings.
	 *
	 * @since  1.0.0
	 * @access protected
	 */
	protected function register_controls() {
	    
	    $elem_lib = wp_list_pluck(get_posts(array('post_type' => 'elementor_library', 'posts_per_page' => 100)), 'post_title', 'ID' );
		$this->start_controls_section(
			'content',
			[
				'label' => esc_html__( 'Content', 'fixkar' ),
			]
		);
		$this->add_control(
			'template',
			[
				'label'   => esc_html__( 'Choose Template', 'fixkar' ),
				'type'    => Controls_Manager::SELECT2,
				'default' => 'horizontal',
				'options' => $elem_lib,
			]
		);
		$this->end_controls_section();

		
	}

	/**
	 * Render button widget output on the frontend.
	 * Written in PHP and used to generate the final HTML.
	 *
	 * @since  1.0.0
	 * @access protected
	 */
	protected function render() {
		
		$settings = $this->get_settings_for_display();

        $template_id = $settings['template'];
        if( $template_id ) {
            echo \Elementor\Plugin::instance()->frontend->get_builder_content_for_display($template_id);
        }		
	}

}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists