HEX
Server: Apache
System: Linux web15f74.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: lucendi (859622)
PHP: 7.4.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/lucendi/www/wp-content/themes/mesmerize/customizer/WebGradientsControl.php
<?php

namespace Mesmerize;


class WebGradientsControl extends \Kirki_Customize_Control {
	public $type = "web-gradients";

	public function __construct( $manager, $id, $args = array() ) {
		$this->button_label = __( 'Change Gradient', 'mesmerize' );
		parent::__construct( $manager, $id, $args );
	}

	public function enqueue()
    {
        $jsRoot = get_template_directory_uri() . "/customizer/js";
        
        if ( ! apply_filters('mesmerize_load_bundled_version', true)) {
            wp_enqueue_script('mesmerize-webgradients-media-tab', $jsRoot . "/webgradients-media-tab.js", array('media-views'));
            wp_enqueue_script('mesmerize-webgradients-control', $jsRoot . "/webgradients-control.js", array("mesmerize-webgradients-media-tab"));
        }
    }

	public function to_json() {
		parent::to_json();
		$this->json['button_label'] = $this->button_label;
	}


	protected function content_template() {
		?>
        <# if ( data.tooltip ) { #>
            <a href="#" class="tooltip hint--left" data-hint="{{ data.tooltip }}"><span class='dashicons dashicons-info'></span></a>
            <# } #>
                <label>
                    <# if ( data.label ) { #>
                        <span class="customize-control-title">{{{ data.label }}}</span>
                        <# } #>
                            <# if ( data.description ) { #>
                                <span class="description customize-control-description">{{{ data.description }}}</span>
                                <# } #>
                </label>

                <div class="webgradient-icon-container">
                    <div class="webgradient-icon-preview">
                        <div class="webgradient {{data.value}}"></i>
                            <input type="hidden" value="{{ data.value }}" name="_customize-input-{{ data.id }}" {{{ data.link }}}/>
                        </div>
                        <div class="label">{{data.value.replace(/_/ig,' ')}}</div>
                        <div class="webgradient-controls">
                            <button type="button" class="button upload-button control-focus" id="_customize-button-{{ data.id }}">{{{ data.button_label }}}</button>
                        </div>
                    </div>
		<?php

	}
}