Skip to content

Commit 29f65e7

Browse files
committed
Update buttongroup.php
1 parent 535ea7f commit 29f65e7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

widgets/buttongroup.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -438,20 +438,18 @@ protected function render() {
438438
if ( empty( $settings['mt_buttongroup_btns'] ) ) {
439439
return;
440440
}
441+
$stackButtons = (($settings['buttongroup_stack_on'] == "none") ? '' : ' ' . $settings['buttongroup_stack_on'] . ' ');
441442

442-
echo '<div class="mighty-buttongroup mt-btng-align-'. $settings['buttongroup_btns_align'] .'">';
443+
echo '<div class="mighty-buttongroup ' . $stackButtons . 'mt-btng-align-'. $settings['buttongroup_btns_align'] .'">';
443444

444445
foreach ( $settings['mt_buttongroup_btns'] as $btngrp ) :
445-
446446
$target = $btngrp['button_link']['is_external'] ? ' target="_blank"' : '';
447447
$nofollow = $btngrp['button_link']['nofollow'] ? ' rel="nofollow"' : '';
448448
$url = $btngrp['button_link']['url'];
449449
$iconAnimation = (($btngrp['button_icon_animation'] !== 'none') ? 'animated '.$btngrp['button_icon_animation'] . ' ' : '');
450450
$buttonIcon = '<i aria-hidden="true" class="'. $iconAnimation . $btngrp['button_icon']['value'].'"></i>';
451451
$buttonAnimation = (!empty($btngrp['hover_animation']) == true ? ' elementor-animation-'.$btngrp['hover_animation'] : '');
452-
$stackButtons = (($settings['buttongroup_stack_on'] == "none") ? '' : ' ' . $settings['buttongroup_stack_on'] . ' ');
453-
454-
echo '<div class="mt-button' . $stackButtons . ' elementor-repeater-item-'. $btngrp['_id'] . '">';
452+
echo '<div class="mt-button elementor-repeater-item-'. $btngrp['_id'] . '">';
455453

456454
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>';
457455

0 commit comments

Comments
 (0)