__( 'Center Left', 'elementor' ), 'center right' => esc_html__( 'Center Right', 'elementor' ), 'top center' => esc_html__( 'Top Center', 'elementor' ), 'top left' => esc_html__( 'Top Left', 'elementor' ), 'top right' => esc_html__( 'Top Right', 'elementor' ), 'bottom center' => esc_html__( 'Bottom Center', 'elementor' ), 'bottom left' => esc_html__( 'Bottom Left', 'elementor' ), 'bottom right' => esc_html__( 'Bottom Right', 'elementor' ), 'custom' => esc_html__( 'Custom', 'elementor' ), ], 'default' => 'center center', 'selectors' => $this->get_mask_selectors( '-webkit-mask-position: {{VALUE}};' ), 'condition' => [ '_mask_switch!' => '', ], ] ); $this->add_responsive_control( '_mask_position_x', [ 'label' => esc_html__( 'X Position', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', '%', 'vw', 'custom' ], 'range' => [ 'px' => [ 'min' => -500, 'max' => 500, ], 'em' => [ 'min' => -100, 'max' => 100, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vw' => [ 'min' => -100, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 0, ], 'selectors' => $this->get_mask_selectors( '-webkit-mask-position-x: {{SIZE}}{{UNIT}};' ), 'condition' => [ '_mask_switch!' => '', '_mask_position' => 'custom', ], ] ); $this->add_responsive_control( '_mask_position_y', [ 'label' => esc_html__( 'Y Position', 'elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', '%', 'vw', 'custom' ], 'range' => [ 'px' => [ 'min' => -500, 'max' => 500, ], 'em' => [ 'min' => -100, 'max' => 100, ], '%' => [ 'min' => -100, 'max' => 100, ], 'vw' => [ 'min' => -100, 'max' => 100, ], ], 'default' => [ 'unit' => '%', 'size' => 0, ], 'selectors' => $this->get_mask_selectors( '-webkit-mask-position-y: {{SIZE}}{{UNIT}};' ), 'condition' => [ '_mask_switch!' => '', '_mask_position' => 'custom', ], ] ); $this->add_responsive_control( '_mask_repeat', [ 'label' => esc_html__( 'Repeat', 'elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'no-repeat' => esc_html__( 'No-repeat', 'elementor' ), 'repeat' => esc_html__( 'Repeat', 'elementor' ), 'repeat-x' => esc_html__( 'Repeat-x', 'elementor' ), 'repeat-Y' => esc_html__( 'Repeat-y', 'elementor' ), 'round' => esc_html__( 'Round', 'elementor' ), 'space' => esc_html__( 'Space', 'elementor' ), ], 'default' => 'no-repeat', 'selectors' => $this->get_mask_selectors( '-webkit-mask-repeat: {{VALUE}};' ), 'condition' => [ '_mask_switch!' => '', '_mask_size!' => 'cover', ], ] ); $this->end_controls_section(); } /** * Register the Responsive section. * * @return void */ private function register_responsive_section() { $this->start_controls_section( '_section_responsive', [ 'label' => esc_html__( 'Responsive', 'elementor' ), 'tab' => Controls_Manager::TAB_ADVANCED, ] ); $this->add_control( 'responsive_description', [ 'raw' => esc_html__( 'Responsive visibility will take effect only on preview or live page, and not while editing in Elementor.', 'elementor' ), 'type' => Controls_Manager::RAW_HTML, 'content_classes' => 'elementor-descriptor', ] ); $this->add_hidden_device_controls(); $this->end_controls_section(); } /** * Register common widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 3.1.0 * @access protected */ protected function register_controls() { $this->register_layout_section(); $this->register_effects_section(); $this->register_transform_section(); $this->register_background_section(); $this->register_border_section(); $this->register_masking_section(); $this->register_responsive_section(); Plugin::$instance->controls_manager->add_custom_attributes_controls( $this ); Plugin::$instance->controls_manager->add_custom_css_controls( $this ); } }