11<?php
2+
23namespace WCF_ADDONS \Widgets ;
34
45use Elementor \Group_Control_Text_Shadow ;
56use Elementor \Group_Control_Typography ;
67use Elementor \Widget_Base ;
78use Elementor \Controls_Manager ;
9+
810if ( ! defined ( 'ABSPATH ' ) ) {
9- exit ; // Exit if accessed directly
11+ exit ; // Exit if accessed directly
1012}
1113
1214/**
@@ -20,11 +22,11 @@ class Animated_Text extends Widget_Base {
2022 /**
2123 * Retrieve the widget name.
2224 *
25+ * @return string Widget name.
2326 * @since 1.0.0
2427 *
2528 * @access public
2629 *
27- * @return string Widget name.
2830 */
2931 public function get_name () {
3032 return 'wcf--text ' ;
@@ -45,11 +47,11 @@ public function get_title() {
4547 /**
4648 * Retrieve the widget icon.
4749 *
50+ * @return string Widget icon.
4851 * @since 1.0.0
4952 *
5053 * @access public
5154 *
52- * @return string Widget icon.
5355 */
5456 public function get_icon () {
5557 return 'wcf eicon-text ' ;
@@ -63,11 +65,11 @@ public function get_icon() {
6365 * Note that currently Elementor supports only one category.
6466 * When multiple categories passed, Elementor uses the first one.
6567 *
68+ * @return array Widget categories.
6669 * @since 1.0.0
6770 *
6871 * @access public
6972 *
70- * @return array Widget categories.
7173 */
7274 public function get_categories () {
7375 return [ 'weal-coder-addon ' ];
@@ -99,6 +101,49 @@ protected function register_controls() {
99101 ]
100102 );
101103
104+ $ this ->add_responsive_control (
105+ 'text_cols ' ,
106+ [
107+ 'label ' => esc_html__ ( 'Columns ' , 'animation-addons-for-elementor ' ),
108+ 'type ' => Controls_Manager::SELECT ,
109+ 'default ' => '' ,
110+ 'options ' => [
111+ '' => esc_html__ ( 'Default ' , 'animation-addons-for-elementor ' ),
112+ '1 ' => esc_html__ ( '1 ' , 'animation-addons-for-elementor ' ),
113+ '2 ' => esc_html__ ( '2 ' , 'animation-addons-for-elementor ' ),
114+ '3 ' => esc_html__ ( '3 ' , 'animation-addons-for-elementor ' ),
115+ '4 ' => esc_html__ ( '4 ' , 'animation-addons-for-elementor ' ),
116+ '5 ' => esc_html__ ( '5 ' , 'animation-addons-for-elementor ' ),
117+ '6 ' => esc_html__ ( '6 ' , 'animation-addons-for-elementor ' ),
118+ '7 ' => esc_html__ ( '7 ' , 'animation-addons-for-elementor ' ),
119+ '8 ' => esc_html__ ( '8 ' , 'animation-addons-for-elementor ' ),
120+ '9 ' => esc_html__ ( '9 ' , 'animation-addons-for-elementor ' ),
121+ '10 ' => esc_html__ ( '10 ' , 'animation-addons-for-elementor ' ),
122+ ],
123+ 'selectors ' => [
124+ '{{WRAPPER}} .wcf--text ' => 'columns: {{VALUE}}; ' ,
125+ ],
126+ ]
127+ );
128+
129+ $ this ->add_responsive_control (
130+ 'text_col_gap ' ,
131+ [
132+ 'label ' => esc_html__ ( 'Columns Gap ' , 'animation-addons-for-elementor ' ),
133+ 'type ' => Controls_Manager::SLIDER ,
134+ 'size_units ' => [ 'px ' ],
135+ 'range ' => [
136+ 'px ' => [
137+ 'min ' => 0 ,
138+ 'max ' => 300 ,
139+ ],
140+ ],
141+ 'selectors ' => [
142+ '{{WRAPPER}} .wcf--text ' => 'gap: {{SIZE}}{{UNIT}}; ' ,
143+ ],
144+ ]
145+ );
146+
102147 $ this ->add_responsive_control (
103148 'align ' ,
104149 [
0 commit comments