Skip to content

Commit bb6f170

Browse files
committed
Added Defaults
1 parent 29f65e7 commit bb6f170

File tree

6 files changed

+61
-70
lines changed

6 files changed

+61
-70
lines changed

assets/css/buttongroup.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
display: block;
33
width: 100%;
44
}
5+
56
.mighty-buttongroup, .mighty-buttongroup.mt-btng-align-justify .mt-button{
67
-webkit-box-align: center;
78
-webkit-align-items: center;

assets/css/counter.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,14 @@
99

1010
.mighty-counter .icon-align-left {
1111
float: left;
12+
}
13+
14+
.mighty-counter .mtcounter-content .counter .count {
15+
font-size: 40px;
16+
/* line-height: 2.2em; */
17+
}
18+
19+
.mighty-counter .mtcounter-content .counter-title {
20+
font-size: 22px;
21+
/* line-height: 0.2em; */
1222
}

widgets/accordion.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ protected function _register_controls() {
9696
[
9797
'accordion_title' => __( 'Accordion 1', 'mighty' ),
9898
'accordion_main_icon' => __( 'fas fa-plus', 'mighty' ),
99-
'accordion_content' => __( 'Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'mighty' ),
99+
'accordion_content' => __( 'Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'mighty' ),
100100
],
101101
[
102102
'accordion_title' => __( 'Accordion 2', 'mighty' ),
103103
'accordion_main_icon' => __( 'fas fa-plus', 'mighty' ),
104-
'accordion_content' => __( 'Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'mighty' ),
104+
'accordion_content' => __( 'Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'mighty' ),
105105
],
106106
],
107107
'title_field' => '{{{ accordion_title }}}',
@@ -476,7 +476,7 @@ protected function _register_controls() {
476476
],
477477
'default' => [
478478
'unit' => 'px',
479-
'size' => 0,
479+
'size' => 5,
480480
],
481481
'selectors' => [
482482
'{{WRAPPER}} .mighty-accordion .mt-panel:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}};'
@@ -556,6 +556,12 @@ protected function _register_controls() {
556556
'label' => __( 'Padding', 'mighty' ),
557557
'type' => Controls_Manager::DIMENSIONS,
558558
'size_units' => [ 'px', 'em', '%' ],
559+
'default' => [
560+
'top' => '10',
561+
'right' => '10',
562+
'bottom' => '10',
563+
'left' => '10',
564+
],
559565
'selectors' => [
560566
'{{WRAPPER}} .mighty-accordion .mt-panel .panel .accordion-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
561567
],

widgets/buttongroup.php

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function _register_controls() {
6161
[
6262
'label' => __('Title', 'mighty'),
6363
'type' => Controls_Manager::TEXT,
64-
'default' => 'Button One',
64+
'default' => 'Click Here',
6565
]
6666
);
6767

@@ -147,24 +147,6 @@ protected function _register_controls() {
147147
]
148148
);
149149

150-
$repeater->add_control(
151-
'button_type',
152-
[
153-
'label' => __('Button Type', 'mighty'),
154-
'type' => \Elementor\Controls_Manager::SELECT,
155-
'default' => 'ma-btn-primary',
156-
'options' => [
157-
'ma-btn-primary' => __('Primary', 'mighty'),
158-
'ma-btn-secondary' => __('Secondary', 'mighty'),
159-
'ma-btn-success' => __('Success', 'mighty'),
160-
'ma-btn-warning' => __('Warning', 'mighty'),
161-
'ma-btn-danger' => __('Danger', 'mighty'),
162-
'ma-btn-info' => __('Info', 'mighty'),
163-
],
164-
'separator' => 'before',
165-
]
166-
);
167-
168150
$repeater->add_control(
169151
'button_size',
170152
[
@@ -297,6 +279,12 @@ protected function _register_controls() {
297279
'label' => __( 'Button Padding', 'mighty' ),
298280
'type' => Controls_Manager::DIMENSIONS,
299281
'size_units' => [ 'px' ],
282+
'default' => [
283+
'top' => '5',
284+
'right' => '30',
285+
'bottom' => '5',
286+
'left' => '30',
287+
],
300288
'selectors' => [
301289
'{{WRAPPER}} .mighty-buttongroup {{CURRENT_ITEM}} a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
302290
],
@@ -337,16 +325,16 @@ protected function _register_controls() {
337325
'fields' => $repeater->get_controls(),
338326
'default' => [
339327
[
340-
'button_text' => __('Facebook', 'mighty'),
341-
'button_link' => '#4267b2',
342-
'button_type' => 'ma-btn-primary',
328+
'button_text' => __('Click Here', 'mighty'),
329+
'button_link' => '#',
343330
'button_size' => 'ma-btn-md',
331+
'buttongroup_bg_color' => '#f96b77',
344332
],
345333
[
346-
'button_text' => __('Twitter', 'mighty'),
347-
'button_link' => '#38A1F3',
348-
'button_type' => 'ma-btn-primary',
334+
'button_text' => __('Click Here', 'mighty'),
335+
'button_link' => '#',
349336
'button_size' => 'ma-btn-md',
337+
'buttongroup_bg_color' => '#a652de',
350338
],
351339
],
352340
'title_field' => '{{{ button_text }}}',
@@ -361,19 +349,19 @@ protected function _register_controls() {
361349
$this->start_controls_section(
362350
'section_spacing',
363351
[
364-
'label' => __( 'Aesthetics', 'mighty' ),
352+
'label' => __( 'Spacing', 'mighty' ),
365353
]
366354
);
367355

368356
$this->add_responsive_control(
369357
'space_between_buttons',
370358
[
371-
'label' => __( 'Spacing', 'mighty' ),
359+
'label' => __( 'Spacing Between Buttons', 'mighty' ),
372360
'type' => \Elementor\Controls_Manager::SLIDER,
373361
'size_units' => [ 'px' ],
374362
'range' => [
375363
'px' => [
376-
'min' => 1,
364+
'min' => 0,
377365
'max' => 50,
378366
],
379367
],
@@ -382,7 +370,7 @@ protected function _register_controls() {
382370
'size' => 10,
383371
],
384372
'selectors' => [
385-
'{{WRAPPER}} .mighty-buttongroup .mt-button .mighty-btn' => 'margin: {{SIZE}}{{UNIT}}',
373+
'{{WRAPPER}} .mighty-buttongroup .mt-button:not(:last-child)' => 'margin-right: {{SIZE}}{{UNIT}}',
386374
],
387375
]
388376
);
@@ -425,7 +413,7 @@ protected function _register_controls() {
425413
'icon' => 'fa fa-align-justify',
426414
]
427415
],
428-
'default' => 'center',
416+
'default' => 'left',
429417
]
430418
);
431419

@@ -451,7 +439,7 @@ protected function render() {
451439
$buttonAnimation = (!empty($btngrp['hover_animation']) == true ? ' elementor-animation-'.$btngrp['hover_animation'] : '');
452440
echo '<div class="mt-button elementor-repeater-item-'. $btngrp['_id'] . '">';
453441

454-
echo '<a ' . (($btngrp['button_css_id'] !== "") ? 'id="' . $btngrp['button_css_id'] . '" ' : '') . 'class="ma-btn mighty-btn '. (($btngrp['button_css_class'] !== "") ? $btngrp['button_css_class'] ." " : '') . $btngrp['button_type'] . ' ' . $btngrp['button_size'] . $buttonAnimation . '" '. $target . $nofollow .' href="'. $url . '">' . ( ($btngrp['button_icon_align']==="left") ? $buttonIcon . ' ' : '' ) . $btngrp['button_text'] . ( ($btngrp['button_icon_align']==="right") ? ' ' . $buttonIcon : '' ) .'</a>';
442+
echo '<a ' . (($btngrp['button_css_id'] !== "") ? 'id="' . $btngrp['button_css_id'] . '" ' : '') . 'class="ma-btn mighty-btn '. (($btngrp['button_css_class'] !== "") ? $btngrp['button_css_class'] ." " : '') . $btngrp['button_size'] . $buttonAnimation . '" '. $target . $nofollow .' href="'. $url . '">' . ( ($btngrp['button_icon_align']==="left") ? $buttonIcon . ' ' : '' ) . $btngrp['button_text'] . ( ($btngrp['button_icon_align']==="right") ? ' ' . $buttonIcon : '' ) .'</a>';
455443

456444
echo '</div>'; // .mt-button
457445
endforeach;

widgets/counter.php

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function _register_controls() {
5757
[
5858
'label' => __( 'Title', 'mighty' ),
5959
'type' => \Elementor\Controls_Manager::TEXT,
60-
'default' => __( 'Title', 'mighty' ),
60+
'default' => __( 'Cups of Coffee', 'mighty' ),
6161
'placeholder' => __( 'Title', 'mighty' ),
6262
]
6363
);
@@ -76,7 +76,7 @@ protected function _register_controls() {
7676
[
7777
'label' => __( 'Ending Number', 'mighty' ),
7878
'type' => \Elementor\Controls_Manager::NUMBER,
79-
'default' => 10,
79+
'default' => 1000,
8080
]
8181
);
8282

@@ -119,7 +119,7 @@ protected function _register_controls() {
119119
'show_counter_icon' => 'yes'
120120
],
121121
'default' => [
122-
'value' => 'fas fa-running',
122+
'value' => 'fas fa-coffee',
123123
'library' => 'solid',
124124
],
125125
]
@@ -148,6 +148,20 @@ protected function _register_controls() {
148148
]
149149
);
150150

151+
$this->end_controls_section();
152+
153+
// Icon Styling
154+
$this->start_controls_section(
155+
'counter_icon_style',
156+
[
157+
'label' => __( 'Icon Styling', 'mighty' ),
158+
'tab' => Controls_Manager::TAB_STYLE,
159+
'condition' => [
160+
'show_counter_icon' => 'yes'
161+
],
162+
]
163+
);
164+
151165
$this->add_responsive_control(
152166
'mt_space_between',
153167
[
@@ -156,7 +170,7 @@ protected function _register_controls() {
156170
'size_units' => [ 'px' ],
157171
'range' => [
158172
'px' => [
159-
'min' => 1,
173+
'min' => 0,
160174
'max' => 200,
161175
],
162176
],
@@ -173,34 +187,6 @@ protected function _register_controls() {
173187
]
174188
);
175189

176-
$this->end_controls_section();
177-
178-
// Icon Styling
179-
$this->start_controls_section(
180-
'counter_icon_style',
181-
[
182-
'label' => __( 'Icon Styling', 'mighty' ),
183-
'tab' => Controls_Manager::TAB_STYLE,
184-
'condition' => [
185-
'show_counter_icon' => 'yes'
186-
],
187-
]
188-
);
189-
190-
$this->add_control(
191-
'icon_position',
192-
[
193-
'label' => __( 'Position', 'mighty' ),
194-
'type' => \Elementor\Controls_Manager::SELECT,
195-
'default' => 'top',
196-
'options' => [
197-
'top' => __( 'Top', 'mighty' ),
198-
'left' => __( 'Left', 'mighty' ),
199-
'right' => __( 'Right', 'mighty' ),
200-
],
201-
]
202-
);
203-
204190
$this->add_responsive_control(
205191
'counter_icon_size',
206192
[
@@ -215,7 +201,7 @@ protected function _register_controls() {
215201
],
216202
'default' => [
217203
'unit' => 'px',
218-
'size' => 50,
204+
'size' => 40,
219205
],
220206
'selectors' => [
221207
'{{WRAPPER}} .mighty-counter .mt-counter-icon i' => 'font-size: {{SIZE}}{{UNIT}}',
@@ -237,7 +223,7 @@ protected function _register_controls() {
237223
],
238224
'default' => [
239225
'unit' => 'px',
240-
'size' => 5,
226+
'size' => 0,
241227
],
242228
'selectors' => [
243229
'{{WRAPPER}} .mighty-counter .mt-counter-icon i' => 'padding: {{SIZE}}{{UNIT}}',
@@ -392,7 +378,7 @@ protected function render() {
392378

393379
// if icon is set
394380
if ( 'yes' === $settings['show_counter_icon'] && ! empty($settings['counter_icon']['value']) ) {
395-
echo '<div class="mt-counter-icon icon-align-'. $settings['icon_position'] . '">';
381+
echo '<div class="mt-counter-icon">';
396382
\Elementor\Icons_Manager::render_icon( $settings['counter_icon'], [ 'aria-hidden' => 'true' ] );
397383
echo '</div>';
398384
}

widgets/testimonial.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ protected function _register_controls() {
627627
],
628628
'default' => [
629629
'unit' => 'px',
630-
'size' => 20,
630+
'size' => 10,
631631
],
632632
'selectors' => [
633633
'{{WRAPPER}} .mighty-testimonial .slick-dots li button::before' => 'font-size: {{SIZE}}{{UNIT}}',

0 commit comments

Comments
 (0)