* @copyright 2007-2022 Apollotheme * @license http://apollotheme.com - prestashop template provider */ namespace LeoElements; use LeoElements\Leo_Helper; if ( ! defined( '_PS_VERSION_' ) ) { exit; // Exit if accessed directly. } /** * Elementor image dimensions control. * * A base control for creating image dimension control. Displays image width * input, image height input and an apply button. * * @since 1.0.0 */ class Control_Image_Dimensions extends Control_Base_Multiple { /** * Get image dimensions control type. * * Retrieve the control type, in this case `image_dimensions`. * * @since 1.0.0 * @access public * * @return string Control type. */ public function get_type() { return 'image_dimensions'; } /** * Get image dimensions control default values. * * Retrieve the default value of the image dimensions control. Used to return the * default values while initializing the image dimensions control. * * @since 1.0.0 * @access public * * @return array Control default value. */ public function get_default_value() { return [ 'width' => '', 'height' => '', ]; } /** * Get image dimensions control default settings. * * Retrieve the default settings of the image dimensions control. Used to return * the default settings while initializing the image dimensions control. * * @since 1.0.0 * @access protected * * @return array Control default settings. */ protected function get_default_settings() { return [ 'show_label' => false, 'label_block' => true, ]; } /** * Render image dimensions 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.0.0 * @access public */ public function content_template() { if ( ! $this->is_image_editor_supports() ) : ?>
<# if ( data.description ) { #>
{{{ data.description }}}
<# } #>
get_control_uid( 'width' ); ?>
x
get_control_uid( 'height' ); ?>
'image/jpeg', ]; return true; ///xxxxx } }