PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
themes
/
besa
/
inc
/
vendors
/
elementor
/
abstract
<?php if (!defined('ABSPATH') || function_exists('Besa_Elementor_Carousel_Base') ) { exit; // Exit if accessed directly. } use Elementor\Controls_Manager; abstract class Besa_Elementor_Carousel_Base extends Besa_Elementor_Responsive_Base { public function get_name() { return 'besa-carousel'; } private function get_rows() { $value = apply_filters( 'besa_admin_elementor_rows', [ 1 => 1, 2 => 2, 3 => 3 ] ); return $value; } protected function add_control_carousel($condition = array()) { $this->register_section_carousel_options($condition); $this->register_section_style_navigation($condition); $this->register_section_style_pagination($condition); } private function register_section_carousel_options( $condition = array() ) { $this->start_controls_section( 'section_carousel_options', [ 'label' => esc_html__( 'Carousel Options', 'besa' ), 'type' => Controls_Manager::SECTION, 'condition' => $condition, ] ); $this->add_control( 'rows', [ 'label' => esc_html__( 'Rows', 'besa' ), 'type' => Controls_Manager::SELECT, 'default' => 1, 'options' => $this->get_rows() ] ); $this->add_control( 'navigation', [ 'label' => esc_html__( 'Navigation', 'besa' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'description' => esc_html__( 'Show/hidden Navigation', 'besa' ), ] ); $this->add_control( 'pagination', [ 'label' => esc_html__( 'Pagination', 'besa' ), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'description' => esc_html__( 'Show/hidden Pagination', 'besa' ), ] ); $this->add_control( 'loop', [ 'label' => esc_html__( 'Infinite Loop', 'besa' ), 'type' => Controls_Manager::SWITCHER, 'default' => '', 'description' => esc_html__( 'Show/hidden Infinite Loop', 'besa' ), ] ); $this->add_control( 'auto', [ 'label' => esc_html__( 'Autoplay', 'besa' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'no', 'description' => esc_html__( 'Show/hidden Autoplay', 'besa' ), ] ); $this->add_control( 'autospeed', [ 'label' => esc_html__( 'Autoplay Speed', 'besa' ), 'type' => Controls_Manager::NUMBER, 'default' => 1000, 'condition' => [ 'auto' => 'yes', ], ] ); $this->add_control( 'disable_mobile', [ 'label' => esc_html__( 'Disable Carousel On Mobile', 'besa' ), 'type' => Controls_Manager::SWITCHER, 'default' => 'yes', 'description' => esc_html__( 'To help load faster in mmobile', 'besa' ), ] ); $this->end_controls_section(); } private function register_section_style_navigation( $condition = array() ) { $condition['navigation'] = 'yes'; $this->start_controls_section( 'section_style_navigation', [ 'label' => esc_html__( 'Navigation', 'besa' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => $condition, ] ); $this->add_responsive_control( 'arrows_width', [ 'label' => esc_html__( 'Width', 'besa' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 10, 'max' => 80, ], ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow' => 'width: {{SIZE}}{{UNIT}}', ], 'condition' => [ 'navigation' => [ 'yes' ], ], ] ); $this->add_responsive_control( 'arrows_height', [ 'label' => esc_html__( 'Height', 'besa' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 10, 'max' => 80, ], ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow' => 'height: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow i' => 'line-height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'navigation' => [ 'yes' ], ], ] ); $this->add_responsive_control( 'arrows_size_icon', [ 'label' => esc_html__( 'Size Icon', 'besa' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 10, 'max' => 50, ], ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow i' => 'font-size: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'navigation' => [ 'yes' ], ], ] ); $this->add_responsive_control( 'arrows_size_position', [ 'label' => esc_html__( 'Position', 'besa' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -100, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow.slick-prev' => 'margin-left: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow.slick-next' => 'margin-right: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'navigation' => [ 'yes' ], ], ] ); $this->add_responsive_control( 'arrows_radius', [ 'label' => esc_html__( 'Border Radius', 'besa' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'arrows_text_color', [ 'label' => esc_html__( 'Text Color', 'besa' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow i' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'arrows_text_color_hover', [ 'label' => esc_html__( 'Text Color Hover', 'besa' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-arrow:hover i' => 'color: {{VALUE}};', ], ] ); $this->end_controls_section(); } private function register_section_style_pagination( $condition = array() ) { $condition['pagination'] = 'yes'; $this->start_controls_section( 'section_style_pagination', [ 'label' => esc_html__( 'Pagination', 'besa' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => $condition, ] ); $this->add_responsive_control( 'pagination_width', [ 'label' => esc_html__( 'Width', 'besa' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 6, 'max' => 50, ], ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-dots li button' => 'width: {{SIZE}}{{UNIT}}', ], ] ); $this->add_responsive_control( 'pagination_height', [ 'label' => esc_html__( 'Height', 'besa' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 6, 'max' => 50, ], ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-dots li button' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'pagination_position', [ 'label' => esc_html__( 'Position', 'besa' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -100, 'max' => 150, ], ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-dots' => 'margin-top: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'pagination_radius', [ 'label' => esc_html__( 'Border Radius', 'besa' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .tbay-element .owl-carousel .slick-dots li button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); } protected function settings_carousel($settings) { $this->add_render_attribute('row', 'class', 'owl-carousel'); $this->add_render_attribute('row', 'data-carousel', 'owl'); $this->add_render_attribute('row', 'data-items', $settings['column']); $this->add_render_attribute('row', 'data-desktopslick', $settings['col_desktop']); $this->add_render_attribute('row', 'data-desktopsmallslick', $settings['col_desktopsmall']); $this->add_render_attribute('row', 'data-tabletslick', $settings['column_tablet']); $this->add_render_attribute('row', 'data-landscapeslick', $settings['col_landscape']); $this->add_render_attribute('row', 'data-mobileslick', $settings['column_mobile']); $this->add_render_attribute('row', 'data-rows', $settings['rows']); $this->add_render_attribute('row', 'data-nav', $settings['navigation'] === 'yes' ? true : false); $this->add_render_attribute('row', 'data-pagination', $settings['pagination'] === 'yes' ? true : false); $this->add_render_attribute('row', 'data-loop', $settings['loop'] === 'yes' ? true : false); if( !empty($settings['autospeed']) ) { $this->add_render_attribute('row', 'data-autospeed', $settings['autospeed'] ); } $this->add_render_attribute('row', 'data-auto', $settings['auto'] === 'yes' ? true : false); $this->add_render_attribute('row', 'data-unslick', $settings['disable_mobile'] === 'yes' ? true : false); } }
[+]
..
[-] image.php
[edit]
[-] .abstract.php
[edit]
[-] responsive.php
[edit]
[-] base.php
[edit]
[-] carousel.php
[edit]