Submit
Path:
~
/
home
/
getwphos
/
www
/
twinkletown
/
wp-content
/
plugins
/
wuko-core
/
includes
/
elementor
/
widgets
/
File Content:
wgl-working-hours.php
<?php /** * This template can be overridden by copying it to `yourtheme[-child]/wgl-extensions/elementor/widgets/wgl-working-hours.php`. */ namespace WGL_Extensions\Widgets; defined('ABSPATH') || exit; // Abort, if called directly. use Elementor\{ Widget_Base, Controls_Manager, Group_Control_Typography, Group_Control_Border, Repeater }; use WGL_Extensions\WGL_Framework_Global_Variables as WGL_Globals; class WGL_Working_Hours extends Widget_Base { public function get_name() { return 'wgl-working-hours'; } public function get_title() { return esc_html__('WGL Working Hours', 'wuko-core'); } public function get_icon() { return 'wgl-working-hours'; } public function get_keywords() { return [ 'working', 'hours' ]; } public function get_categories() { return ['wgl-modules']; } public function get_script_depends() { return ['jquery-appear']; } protected function register_controls() { /*-----------------------------------------------------------------------------------*/ /* Content /*-----------------------------------------------------------------------------------*/ $this->start_controls_section( 'wgl_working_section', ['label' => esc_html__('Content', 'wuko-core') ] ); $repeater = new Repeater(); $repeater->add_control( 'working_day', [ 'label' => esc_html__('Day', 'wuko-core'), 'type' => Controls_Manager::TEXT, 'dynamic' => ['active' => true], 'default' => esc_html__('Monday', 'wuko-core'), ] ); $repeater->add_control( 'working_hours', [ 'label' => esc_html__('Hours', 'wuko-core'), 'type' => Controls_Manager::TEXT, 'dynamic' => ['active' => true], 'default' => esc_html__('8.00 - 21.00', 'wuko-core'), ] ); $repeater->add_control( 'custom_colors', [ 'label' => esc_html__('Custom Colors', 'wuko-core'), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__('On', 'wuko-core'), 'label_off' => esc_html__('Off', 'wuko-core'), ] ); $repeater->add_control( 'day_color', [ 'label' => esc_html__('Day Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'default' => WGL_Globals::get_main_font_color(), 'condition' => ['custom_colors' => 'yes'], ] ); $repeater->add_control( 'hours_color', [ 'label' => esc_html__('Hours Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'default' => WGL_Globals::get_secondary_color(), 'condition' => ['custom_colors' => 'yes'], ] ); $this->add_control( 'items', [ 'label' => esc_html__('Days', 'wuko-core'), 'type' => Controls_Manager::REPEATER, 'default' => [ ['working_day' => esc_html__('Monday', 'wuko-core')], ['working_day' => esc_html__('Tuesday', 'wuko-core')], ], 'fields' => $repeater->get_controls(), 'title_field' => '{{working_day}}', ] ); $this->end_controls_section(); /*-----------------------------------------------------------------------------------*/ /* Style Section /*-----------------------------------------------------------------------------------*/ $this->start_controls_section( 'style_section', [ 'label' => esc_html__('Styles', 'wuko-core'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'item_styles', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__('Item Styles', 'wuko-core'), ] ); $this->add_responsive_control( 'item_margin', [ 'label' => esc_html__('Margin', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'separator' => 'after', 'size_units' => ['px', 'em', '%', 'custom'], 'default' => [ 'top' => '0', 'right' => '0', 'bottom' => '6', 'left' => '0', 'unit' => 'px', 'isLinked' => false, ], 'selectors' => [ '{{WRAPPER}} .working-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'item_padding', [ 'label' => esc_html__('Padding', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%', 'custom'], 'selectors' => [ '{{WRAPPER}} .working-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'image_border', 'separator' => 'after', 'selector' => '{{WRAPPER}} .working-item', ] ); $this->add_control( 'day_styles', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__('Day Styles', 'wuko-core'), ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'day_typo', 'selector' => '{{WRAPPER}} .working-item_day', ] ); $this->add_control( 'day_color', [ 'label' => esc_html__('Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'default' => WGL_Globals::get_main_font_color(), 'selectors' => [ '{{WRAPPER}} .working-item_day' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'day_margin', [ 'label' => esc_html__('Margin', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'separator' => 'after', 'size_units' => ['px', 'em', '%', 'custom'], 'selectors' => [ '{{WRAPPER}} .working-item_day' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'hours_styles', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__('Hours Styles', 'wuko-core'), ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'hours_typo', 'selector' => '{{WRAPPER}} .working-item_hours', ] ); $this->add_control( 'hours_color', [ 'label' => esc_html__('Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'default' => WGL_Globals::get_secondary_color(), 'selectors' => [ '{{WRAPPER}} .working-item_hours' => 'color: {{VALUE}};', ], ] ); $this->add_responsive_control( 'hours_margin', [ 'label' => esc_html__('Margin', 'wuko-core'), 'type' => Controls_Manager::DIMENSIONS, 'separator' => 'after', 'size_units' => ['px', 'em', '%', 'custom'], 'selectors' => [ '{{WRAPPER}} .working-item_hours' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'line_color', [ 'label' => esc_html__('Line Between Color', 'wuko-core'), 'type' => Controls_Manager::COLOR, 'dynamic' => ['active' => true], 'selectors' => [ '{{WRAPPER}} .working-item::after' => 'background-color: {{VALUE}};', ], ] ); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $this->add_render_attribute('working-hours', 'class', 'wgl-working-hours'); ?><div <?php echo $this->get_render_attribute_string('working-hours'); ?>><?php foreach ($settings['items'] as $index => $item) { $working_day = $this->get_repeater_setting_key('working_day', 'items' , $index); $this->add_render_attribute( $working_day, [ 'class' => [ 'working-item_day', ], 'style' => [ ((bool)$item['custom_colors'] ? 'color: ' . esc_attr($item['day_color']) . ';' : ''), ] ] ); $working_hours = $this->get_repeater_setting_key('working_hours', 'items' , $index); $this->add_render_attribute($working_hours, [ 'class' => [ 'working-item_hours', ], 'style' => [ ((bool)$item['custom_colors'] ? 'color: '.esc_attr($item['hours_color']).';' : ''), ] ] ); ?> <div class="working-item"><?php if (!empty($item['working_day'])) { ?><div <?php echo $this->get_render_attribute_string($working_day); ?>><?php echo esc_html($item['working_day']); ?></div><?php } if (!empty($item['working_hours'])) { ?><div <?php echo $this->get_render_attribute_string($working_hours); ?>><?php echo esc_html($item['working_hours']); ?></div><?php }?> </div><?php } ?></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 ); } }
Edit
Rename
Chmod
Delete
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