@@ -58,19 +58,17 @@ protected function _register_controls() {
5858 'type ' => Controls_Manager::REPEATER ,
5959 'default ' => [
6060 [
61- 'mt_progressbar_title ' => __ ('Facebook ' ,'mighty ' ),
62- 'mt_progressbar_color ' => '#4267b2 ' ,
63- 'mt_progressbar_bgcolor ' => '#EEEEEE ' ,
61+ 'mt_progressbar_title ' => __ ('Graphic Design ' ,'mighty ' ),
62+ 'mt_progressbar_value ' => '93 ' ,
6463 ],
6564 [
66- 'mt_progressbar_title ' => __ ('Twitter ' ,'mighty ' ),
67- 'mt_progressbar_color ' => '#38A1F3 ' ,
68- 'mt_progressbar_bgcolor ' => '#EEEEEE ' ,
65+ 'mt_progressbar_title ' => __ ('Web Design ' ,'mighty ' ),
66+ 'mt_progressbar_value ' => '84 ' ,
6967 ],
7068 [
71- 'mt_progressbar_title ' => __ ('Reddit ' ,'mighty ' ),
72- 'mt_progressbar_color ' => '#ff4500 ' ,
73- ' mt_progressbar_bgcolor ' => ' #EEEEEE ' ,
69+ 'mt_progressbar_title ' => __ ('Photoshop ' ,'mighty ' ),
70+ 'mt_progressbar_value ' => '89 ' ,
71+
7472 ],
7573 ],
7674
@@ -105,9 +103,8 @@ protected function _register_controls() {
105103 'name ' => 'mt_progressbar_color ' ,
106104 'label ' => __ ( 'Progress Bar Color ' , 'mighty ' ),
107105 'type ' => Controls_Manager::COLOR ,
108- 'default ' => '#ff6347 ' ,
109106 'selectors ' => [
110- '{{WRAPPER}} .mighty-progressbar {{CURRENT_ITEM}} > .progressbar ' => 'background: {{VALUE}}; ' ,
107+ '{{WRAPPER}} .mighty-progressbar .progress-bar {{CURRENT_ITEM}} > .progressbar ' => 'background: {{VALUE}}; ' ,
111108 ],
112109 ],
113110
@@ -116,7 +113,7 @@ protected function _register_controls() {
116113 'label ' => __ ( 'Background Color ' , 'mighty ' ),
117114 'type ' => Controls_Manager::COLOR ,
118115 'selectors ' => [
119- '{{WRAPPER}} .mighty-progressbar {{CURRENT_ITEM}} ' => 'background: {{VALUE}}; ' ,
116+ '{{WRAPPER}} .mighty-progressbar .progress-bar {{CURRENT_ITEM}} ' => 'background: {{VALUE}}; ' ,
120117 ],
121118 ],
122119 ],
@@ -154,7 +151,7 @@ protected function _register_controls() {
154151 [
155152 'label ' => __ ( 'Title Position ' , 'mighty ' ),
156153 'type ' => \Elementor \Controls_Manager::SELECT ,
157- 'default ' => 'inside ' ,
154+ 'default ' => 'outside ' ,
158155 'options ' => [
159156 'inside ' => __ ( 'Inside ' , 'mighty ' ),
160157 'outside ' => __ ( 'Outside ' , 'mighty ' ),
@@ -170,7 +167,7 @@ protected function _register_controls() {
170167 'label_on ' => __ ( 'On ' , 'mighty ' ),
171168 'label_off ' => __ ( 'Off ' , 'mighty ' ),
172169 'return_value ' => 'yes ' ,
173- 'default ' => ' no ' ,
170+ 'default ' => true ,
174171 ]
175172 );
176173
@@ -179,7 +176,7 @@ protected function _register_controls() {
179176 [
180177 'label ' => __ ( 'Percentage Position ' , 'mighty ' ),
181178 'type ' => \Elementor \Controls_Manager::SELECT ,
182- 'default ' => 'inside ' ,
179+ 'default ' => 'outside ' ,
183180 'options ' => [
184181 'inside ' => __ ( 'Inside ' , 'mighty ' ),
185182 'outside ' => __ ( 'Outside ' , 'mighty ' ),
@@ -204,7 +201,7 @@ protected function _register_controls() {
204201 ],
205202 'default ' => [
206203 'unit ' => 'px ' ,
207- 'size ' => 40 ,
204+ 'size ' => 8 ,
208205 ],
209206 'selectors ' => [
210207 '{{WRAPPER}} .progress-bar ' => 'height: {{SIZE}}{{UNIT}} ' ,
@@ -213,9 +210,9 @@ protected function _register_controls() {
213210 );
214211
215212 $ this ->add_responsive_control (
216- 'mt_progressbar_padding ' ,
213+ 'mt_progressbar_spacing ' ,
217214 [
218- 'label ' => __ ( 'Padding ' , 'mighty ' ),
215+ 'label ' => __ ( 'Spacing ' , 'mighty ' ),
219216 'type ' => \Elementor \Controls_Manager::SLIDER ,
220217 'size_units ' => [ 'px ' ],
221218 'range ' => [
@@ -229,7 +226,7 @@ protected function _register_controls() {
229226 'size ' => 10 ,
230227 ],
231228 'selectors ' => [
232- '{{WRAPPER}} .mighty-progressbar ' => 'padding : {{SIZE}}{{UNIT}} ' ,
229+ '{{WRAPPER}} .mighty-progressbar .progress-bar:not(:last-child) ' => 'margin-bottom : {{SIZE}}{{UNIT}} ' ,
233230 ],
234231 ]
235232 );
@@ -238,7 +235,8 @@ protected function _register_controls() {
238235 'mt_progressbar_global_color ' ,
239236 [
240237 'label ' => __ ( 'Color ' , 'mighty ' ),
241- 'type ' => Controls_Manager::COLOR ,
238+ 'type ' => Controls_Manager::COLOR ,
239+ 'default ' => '#4965fb ' ,
242240 'selectors ' => [
243241 '{{WRAPPER}} .mighty-progressbar .progress-bar .progressbar ' => 'background: {{VALUE}}; ' ,
244242 ],
@@ -249,7 +247,8 @@ protected function _register_controls() {
249247 'mt_progressbar_bg_color ' ,
250248 [
251249 'label ' => __ ( 'Background Color ' , 'mighty ' ),
252- 'type ' => Controls_Manager::COLOR ,
250+ 'type ' => Controls_Manager::COLOR ,
251+ 'default ' => '#e8eaf0 ' ,
253252 'selectors ' => [
254253 '{{WRAPPER}} .mighty-progressbar .progress-bar ' => 'background-color: {{VALUE}}; ' ,
255254 ],
@@ -306,9 +305,9 @@ protected function _register_controls() {
306305 'type ' => Scheme_Color::get_type (),
307306 'value ' => Scheme_Color::COLOR_1 ,
308307 ],
309- 'default ' => '#000 ' ,
308+ 'default ' => '#333 ' ,
310309 'selectors ' => [
311- '{{WRAPPER}} .mighty-progressbar p ' => 'color: {{VALUE}}; ' ,
310+ '{{WRAPPER}} .mighty-progressbar ' => 'color: {{VALUE}}; ' ,
312311 ],
313312 ]
314313 );
@@ -320,8 +319,8 @@ protected function _register_controls() {
320319 'label ' => __ ( 'Typography ' , 'mighty ' ),
321320 'scheme ' => Scheme_Typography::TYPOGRAPHY_1 ,
322321 'selectors ' => [
323- '{{WRAPPER}} .mighty-progressbar p .progressbar-title ' ,
324- '{{WRAPPER}} .mighty-progressbar p .percentage ' ,
322+ '{{WRAPPER}} .mighty-progressbar .progressbar-title ' ,
323+ '{{WRAPPER}} .mighty-progressbar .percentage ' ,
325324 ]
326325 ]
327326 );
@@ -352,11 +351,11 @@ protected function render() {
352351
353352 echo '<div class="progressbar-details"> ' ;
354353 if ( $ settings ['mt_title_position ' ] === 'outside ' ) {
355- echo '<p class="progressbar-title"> ' . $ progressbar ['mt_progressbar_title ' ] . '</p > ' ;
354+ echo '<div class="progressbar-title"> ' . $ progressbar ['mt_progressbar_title ' ] . '</div > ' ;
356355 }
357356
358357 if ( $ settings ['mt_percentage_position ' ] === 'outside ' ) {
359- echo '<p class="progressbar-percentage"> ' . ( ($ percentage ===true ) ? $ progressbar ['mt_progressbar_value ' ]['size ' ] . $ progressbar ['mt_progressbar_value ' ]['unit ' ] .'' : '' ) .'</p > ' ;
358+ echo '<div class="progressbar-percentage"> ' . ( ($ percentage ===true ) ? $ progressbar ['mt_progressbar_value ' ]['size ' ] . $ progressbar ['mt_progressbar_value ' ]['unit ' ] .'' : '' ) .'</div > ' ;
360359 }
361360 echo '</div> ' ;
362361
@@ -365,11 +364,11 @@ protected function render() {
365364 echo '<div class="progressbar"> ' ;
366365
367366 if ( $ settings ['mt_title_position ' ] === 'inside ' ) {
368- echo '<p class="progressbar-title"> ' . $ progressbar ['mt_progressbar_title ' ] . '</p > ' ;
367+ echo '<div class="progressbar-title"> ' . $ progressbar ['mt_progressbar_title ' ] . '</div > ' ;
369368 }
370369
371370 if ( $ settings ['mt_percentage_position ' ] === 'inside ' ) {
372- echo '<p class="progressbar-percentage"> ' . ( ($ percentage ===true ) ? $ progressbar ['mt_progressbar_value ' ]['size ' ] . $ progressbar ['mt_progressbar_value ' ]['unit ' ] .'' : '' ) .'</p > ' ;
371+ echo '<div class="progressbar-percentage"> ' . ( ($ percentage ===true ) ? $ progressbar ['mt_progressbar_value ' ]['size ' ] . $ progressbar ['mt_progressbar_value ' ]['unit ' ] .'' : '' ) .'</div > ' ;
373372 }
374373
375374 echo '</div> ' ; # .progressbar
0 commit comments