Submit
Path:
~
/
home
/
getwphos
/
www
/
twinkletown
/
wp-content
/
plugins
/
wuko-core
/
includes
/
elementor
/
widgets
/
File Content:
wgl-image-comparison.php
<?php /** * This template can be overridden by copying it to `yourtheme[-child]/wgl-extensions/elementor/widgets/wgl-image-comparison.php`. */ namespace WGL_Extensions\Widgets; defined('ABSPATH') || exit; // Abort, if called directly. use Elementor\{ Widget_Base, Controls_Manager, Control_Media, Utils }; use WGL_Extensions\Includes\WGL_Elementor_Helper; use WGL_Extensions\WGL_Framework_Global_Variables as WGL_Globals; class WGL_Image_Comparison extends Widget_Base { public function get_name() { return 'wgl-image-comparison'; } public function get_title() { return esc_html__('WGL Image Comparison', 'wuko-core'); } public function get_icon() { return 'wgl-image-comparison'; } public function get_keywords() { return [ 'image', 'comparison' ]; } public function get_categories() { return ['wgl-modules']; } public function get_script_depends() { return ['wgl-widgets', 'cocoen']; } protected function register_controls() { /** * CONTENT -> GENERAL */ $this->start_controls_section( 'wgl_image_comparison_section', ['label' => esc_html__('General', 'wuko-core')] ); $this->add_control( 'before_image', [ 'label' => esc_html__('Before Image', 'wuko-core'), 'type' => Controls_Manager::MEDIA, 'dynamic' => ['active' => true], 'label_block' => true, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $this->add_control( 'after_image', [ 'label' => esc_html__('After Image', 'wuko-core'), 'type' => Controls_Manager::MEDIA, 'dynamic' => ['active' => true], 'label_block' => true, 'default' => [ 'url' => Utils::get_placeholder_image_src(), ], ] ); $this->end_controls_section(); /** * STYLE -> SLIDER BAR STYLES */ $this->start_controls_section( 'section_style', [ 'label' => esc_html__('Slider Bar Styles', 'wuko-core'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'slider', [ 'label' => esc_html__('Slider Bar', 'wuko-core'), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'slider_color', [ 'label' => esc_html__('Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'render_type' => 'template', 'default' => '#04011C', 'selectors' => [ '{{WRAPPER}} .cocoen-drag::before, {{WRAPPER}} .cocoen-drag::after' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'slider_bg', [ 'label' => esc_html__('Background Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'selectors' => [ '{{WRAPPER}} .cocoen-drag, {{WRAPPER}} .cocoen-drag::before' => 'background-color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'slider_border_radius', [ 'label' => esc_html__('Border Radius', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%', 'custom'], 'selectors' => [ '{{WRAPPER}} .wgl-image_comparison.cocoen .cocoen-drag::before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); } protected function render() { $_s = $this->get_settings_for_display(); $styles = ''; if (!!$_s['slider_color']){ $styles = '.elementor-element-' . esc_attr( $this->get_id() ) . ' .wgl-image_comparison.cocoen .cocoen-drag::before, .elementor-element-' . esc_attr( $this->get_id() ) . ' .wgl-image_comparison.cocoen .cocoen-drag::after{ background-image: url(\'data:image/svg+xml; utf8, '.wgl_dynamic_styles()->bg_caret($_s['slider_color'] ? esc_attr($_s['slider_color']) : WGL_Globals::get_secondary_color()).'\'); }'; } WGL_Elementor_Helper::enqueue_css( $styles, false ); $this->add_render_attribute('image_comp_wrapper', 'class', [ 'wgl-image_comparison', 'cocoen' ]); $this->add_render_attribute('before_image', [ 'class' => [ 'comp-image_before', 'comp-image' ], 'src' => isset($_s['before_image']['url']) ? esc_url($_s['before_image']['url']) : '', 'alt' => Control_Media::get_image_alt($_s['before_image']), ]); $this->add_render_attribute('after_image', [ 'class' => [ 'comp-image_after', 'comp-image' ], 'src' => isset($_s['after_image']['url']) ? esc_url($_s['after_image']['url']) : '', 'alt' => Control_Media::get_image_alt($_s['after_image']), ]); ?><div <?php echo $this->get_render_attribute_string('image_comp_wrapper'); ?>> <img <?php echo $this->get_render_attribute_string('before_image'); ?> /> <img <?php echo $this->get_render_attribute_string('after_image'); ?> /> </div><?php } public function wpml_support_module() { add_filter( 'wpml_elementor_widgets_to_translate', [$this, 'wpml_widgets_to_translate_filter']); } public function wpml_widgets_to_translate_filter( $widgets ){ return \WGL_Extensions\Includes\WGL_WPML_Settings::get_translate( $this, $widgets ); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
wgl-accordion-service.php
110791 bytes
0644
wgl-background-clip-text.php
21249 bytes
0644
wgl-blog.php
54012 bytes
0644
wgl-button-physics.php
48634 bytes
0644
wgl-button-widget.php
78290 bytes
0644
wgl-carousel.php
5648 bytes
0644
wgl-cases.php
174614 bytes
0644
wgl-circuit-service.php
21621 bytes
0644
wgl-clients.php
28542 bytes
0644
wgl-combo-menu.php
17440 bytes
0644
wgl-contact-form-7.php
64476 bytes
0644
wgl-countdown.php
19442 bytes
0644
wgl-counter.php
36515 bytes
0644
wgl-demo-item.php
33716 bytes
0644
wgl-double-heading.php
71788 bytes
0644
wgl-dynamic-title.php
11086 bytes
0644
wgl-flipbox.php
154999 bytes
0644
wgl-gallery.php
53821 bytes
0644
wgl-highlight-board.php
64418 bytes
0644
wgl-horizontal-scroll.php
25075 bytes
0644
wgl-image-animate.php
20947 bytes
0644
wgl-image-comparison.php
6032 bytes
0644
wgl-image-hotspots.php
52892 bytes
0644
wgl-image-layers.php
25243 bytes
0644
wgl-infinity-carousel.php
30821 bytes
0644
wgl-info-box.php
224793 bytes
0644
wgl-instagram.php
38631 bytes
0644
wgl-link-overlay.php
2495 bytes
0644
wgl-pie-chart.php
22332 bytes
0644
wgl-portfolio.php
115147 bytes
0644
wgl-pricing-table.php
209138 bytes
0644
wgl-products-categories.php
51718 bytes
0644
wgl-products-grid.php
79654 bytes
0644
wgl-progress-bar.php
30822 bytes
0644
wgl-rotated-text.php
22605 bytes
0644
wgl-satellite-service.php
35978 bytes
0644
wgl-showcase.php
208669 bytes
0644
wgl-social-icons.php
22240 bytes
0644
wgl-steps.php
48391 bytes
0644
wgl-striped-services.php
183259 bytes
0644
wgl-tabs-horizontal.php
42144 bytes
0644
wgl-tabs.php
53431 bytes
0644
wgl-team.php
36456 bytes
0644
wgl-template.php
8246 bytes
0644
wgl-testimonials.php
61375 bytes
0644
wgl-text-editor.php
55551 bytes
0644
wgl-text-path.php
41438 bytes
0644
wgl-time-line-horizontal.php
37694 bytes
0644
wgl-time-line-vertical.php
199396 bytes
0644
wgl-toggle-accordion.php
66819 bytes
0644
wgl-video-popup.php
30956 bytes
0644
wgl-working-hours.php
10870 bytes
0644
wgl-zoom.php
24854 bytes
0644
N4ST4R_ID | Naxtarrr