Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/hessa.corals.io/wp-content/themes/kicker/plugins/elementor/params/choice/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/hessa.corals.io/wp-content/themes/kicker/plugins/elementor/params/choice/choice.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Choice control.
 *
 * A base control for creating a theme-specific choice control - list of images (pictograms).
 *
 * Creating new control in the editor (inside `Widget_Base::_register_controls()`
 * method):
 *
 *    $this->add_control(
 *    	'body_style',
 *    	[
 *    		'label'   => __( 'Body style', 'theme-domain' ),
 *    		'type'    => 'choice',
 * 			'options' => [
 * 							'boxed' => [
 * 										'title' => __( 'Boxed', 'theme-domain' ),
 * 										'icon'  => 'URL_of_the_image_for_this_choice',
 * 										]
 * 							],
 * 							'wide' => [
 * 										'title' => __( 'Wide', 'theme-domain' ),
 * 										'icon'  => 'URL_of_the_image_for_this_choice',
 * 										]
 * 							]
 *    	]
 *    );
 *
 * @since 1.70.0
 *
 * @param string $label       Optional. The label that appears above of the
 *                            field. Default is empty.
 * @param string $description Optional. The description that appears below the
 *                            field. Default is empty.
 * @param string $default     Optional. Default icon name. Default is empty.
 * @param array  $options     Required. An associative array of available choices.
 * @param string $separator   Optional. Set the position of the control separator.
 *                            Available values are 'default', 'before', 'after'
 *                            and 'none'. 'default' will position the separator
 *                            depending on the control type. 'before' / 'after'
 *                            will position the separator before/after the
 *                            control. 'none' will hide the separator. Default
 *                            is 'default'.
 * @param bool   $show_label  Optional. Whether to display the label. Default is
 *                            true.
 * @param bool   $label_block Optional. Whether to display the label in a
 *                            separate line. Default is false.
 */
class Kicker_Elementor_Control_Choice extends \Elementor\Base_Data_Control {

	/**
	 * Retrieve icon control type.
	 *
	 * @since 1.70.0
	 * @access public
	 *
	 * @return string Control type.
	 */
	public function get_type() {
		return 'choice';
	}

	/**
	 * Retrieve control's default settings.
	 *
	 * Get the default settings of the control, used while initializing the control.
	 *
	 * @since 1.70.0
	 * @access protected
	 *
	 * @return array Control default settings.
	 */
	protected function get_default_settings() {
		return [
			'options' => array()
		];
	}

	
	/**
	 * Enqueue control required scripts and styles.
	 *
	 * Used to register and enqueue custom scripts and styles used by this control.
	 *
	 * @since 1.70.0
	 * @access public
	 */
	public function enqueue() {
		wp_enqueue_script( 'kicker-elementor-choice-control', kicker_get_file_url( 'plugins/elementor/params/choice/choice-control.js'), array('jquery'), null, true );
	}

	/**
	 * Render control output in the editor.
	 *
	 * Used to generate the control HTML in the editor using Underscore JS
	 * template. The variables for the class are available using `data` JS
	 * object.
	 *
	 * @since 1.70.0
	 * @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">
				<div class="kicker_param_choice">
					<input type="hidden" id="<?php echo esc_attr($control_uid); ?>"
							data-setting="{{ data.name }}"
							class="{{ data.name }} {{ data.type }}_field"
							value="{{ data.controlValue }}" />
					<div class="kicker_list_choice"><#
						_.each( data.options, function( params, slug ) {
							print( ( params.new_row !== undefined
										? '<span class="kicker_list_choice_rows_separator"></span>'
										: ''
										)
									+ '<span tabindex="0" class="kicker_list_choice_item'
												+ ( ( slug == data.controlValue && '' !== data.controlValue ) || ( 'inherit' == slug && '' === data.controlValue ) ? ' kicker_list_active' : '' )
												+ '"'
										+ ' data-choice="' + slug + '"'
										+ ( params.description ? ' title="' + params.description + '"' : '' )
									+ '>'
										+ '<span class="kicker_list_choice_item_icon">'
											+ '<img src="' + ( params.icon.indexOf( '//' ) == -1 ? '<?php echo esc_url( trailingslashit( get_template_directory_uri() ) ); ?>' : '' ) + params.icon + '" alt="' + params.title + '">'
										+ '</span>'
										+ '<span class="kicker_list_choice_item_title">'
											+ params.title
										+ '</span>'
									+ '</span>');
						} );
					#></div>
				</div>
			</div>
		</div>
		<# if ( data.description ) { #>
			<div class="elementor-control-field-description">{{ data.description }}</div>
		<# } #>
		<?php
	}
}

Spamworldpro Mini