# master-addons/3.1.2/inc/controls/file-select.php

Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder &amp; Template Kits, version 3.1.2. 76 lines.

- Page: https://pluginprobe.com/plugins/master-addons/3.1.2/code/inc/controls/file-select.php
- Raw: https://pluginprobe.com/plugins/master-addons/3.1.2/raw/inc/controls/file-select.php
- Modified: 2026-03-08T11:32:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/master-addons/3.1.2/code/inc/controls/file-select.php#L10-L20`.

```php
<?php

namespace MasterAddons\Inc\Controls;

use Elementor\Base_Data_Control;
use MasterAddons\Inc\Classes\Assets_Manager;

if (!defined('ABSPATH')) {
    exit;
};

class JLTMA_File_Select extends Base_Data_Control
{

    public function get_type()
    {
        return 'jltma-file-select';
    }


    /**
     * Enqueue control scripts and styles.
     *
     * Used to register and enqueue custom scripts and styles
     * for this control.
     *
     * @access public
     */
    public function enqueue()
    {
        wp_enqueue_media();
        wp_enqueue_style('thickbox');
        wp_enqueue_script('media-upload');
        wp_enqueue_script('thickbox');

        Assets_Manager::enqueue('file-select-control');
    }

    /**
     * Get default settings.
     *
     * @access protected
     *
     * @return array Control default settings.
     */
    protected function get_default_settings()
    {
        return [
            'label_block' => true,
        ];
    }

    /**
     * Render control output in the editor.
     *
     * @access public
     */
    public function content_template()
    {
        $control_uid = $this->get_control_uid();
?>
        <div class="elementor-control-field">
            <label for="<?php echo esc_attr($control_uid); ?>" class="elementor-control-title">{{{ data.label }}}</label>
            <div class="elementor-control-input-wrapper">
                <a href="#" class="jltma-select-file elementor-button elementor-button-success" style="padding: 10px 15px;border:none !important;display: block;text-align: center;" id="select-file-<?php echo esc_attr($control_uid); ?>"><?php echo esc_html__("Choose / Upload File", 'master-addons'); ?></a> <br />

                <input type="text" class="jltma-selected-file-url" id="<?php echo esc_attr($control_uid); ?>" data-setting="{{ data.name }}" placeholder="{{ data.placeholder }}">
            </div>
        </div>
        <# if ( data.description ) { #>
            <div class="elementor-control-field-description">{{{ data.description }}}</div>
            <# } #>
        <?php
    }
}

```
