updateControl('image', [ 'label' => '', 'dynamic' => ['default' => Plugin::$instance->dynamic_tags->tagDataToTagText(null, 'site-logo')], 'default' => ['url' => 'img/' . \Configuration::get('PS_LOGO')], ], [ 'recursive' => true, ]); $this->updateControl('link_to', [ 'default' => 'custom', ]); $this->updateControl('link', [ 'dynamic' => ['default' => Plugin::$instance->dynamic_tags->tagDataToTagText(null, 'site-url')], 'default' => ['url' => __PS_BASE_URI__], ], [ 'recursive' => true, ]); $this->removeControl('caption'); $this->startInjection([ 'of' => 'height', ]); $this->addControl( 'shrink', [ 'label' => __('Sticked'), 'type' => ControlsManager::POPOVER_TOGGLE, 'render_type' => 'ui', 'condition' => [ 'height[size]!' => '', ], ] ); $this->startPopover(); $this->addResponsiveControl( 'shrink_height', [ 'label' => __('Height'), 'type' => ControlsManager::SLIDER, 'size_units' => ['px', 'vh'], 'range' => [ 'px' => [ 'min' => 1, 'max' => 500, ], ], 'selectors' => [ '.elementor-sticky--active:not(#e) .elementor-element-{{ID}} .elementor-image img' => 'height: {{SIZE}}{{UNIT}}', ], 'condition' => [ 'shrink!' => '', ], ] ); $this->addControl( 'shrink_duration', [ 'label' => __('Transition Duration') . ' (s)', 'type' => ControlsManager::SLIDER, 'range' => [ 'px' => [ 'max' => 3, 'step' => 0.1, ], ], 'default' => [ 'size' => 0.3, ], 'selectors' => [ '{{WRAPPER}} .elementor-image img' => 'transition: height {{SIZE}}s', ], 'condition' => [ 'shrink!' => '', ], ] ); $this->endPopover(); $this->endInjection(); } protected function getHtmlWrapperClass() { return parent::getHtmlWrapperClass() . ' elementor-widget-' . parent::getName(); } }