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/wptuneprotect/wp-content/plugins/insert-php/libs/factory/forms/controls/color.php
<?php

	/**
	 * Color
	 *
	 * Main options:
	 *  name            => a name of the control
	 *  value           => a value to show in the control
	 *  default         => a default value of the control if the "value" option is not specified
	 *
	 * @author Alex Kovalev <alex.kovalevv@gmail.com>
	 * @copyright (c) 2018, Webcraftic Ltd
	 *
	 * @package core
	 * @since 1.0.0
	 */

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

	if( !class_exists('Wbcr_FactoryForms460_ColorControl') ) {

		class Wbcr_FactoryForms460_ColorControl extends Wbcr_FactoryForms460_Control {

			public $type = 'color';

			/**
			 * Shows the html markup of the control.
			 *
			 * @since 1.0.0
			 * @return void
			 */
			public function html()
			{
				$name = $this->getNameOnForm();
				$value = esc_attr($this->getValue());

				if( !$value ) {
					$value = '#1e8cbe';
				}

				// the "pickerTarget" options allows to select element where the palette will be shown
				$picker_target = $this->getOption('pickerTarget');

				if( !empty($picker_target) ) {
					$this->addHtmlData('picker-target', $picker_target);
				}

				?>
				<div <?php $this->attrs() ?>>
					<div class="factory-background" <?php echo(!empty($value)
						? 'style="background:' . $value . ';"'
						: ''); ?>></div>
					<div class="factory-pattern"></div>
					<input type="text" id="<?php echo esc_attr($name); ?>" name="<?php echo esc_attr($name); ?>" class="factory-input-text factory-color-hex" value="<?php echo esc_attr($value); ?>">
				</div>
			<?php
			}
		}
	}