Skip to content

Commit

Permalink
Merge branch 'release/1.49.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Apr 23, 2023
2 parents 85e01e5 + 0ecc2e9 commit eff7c1f
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 35 deletions.
2 changes: 1 addition & 1 deletion base/inc/video.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ public function loop_callback( $match ) {

$new_url = add_query_arg(
array(
'loop' => 1,
// Adding the current video in a playlist allows for YouTube to loop the video.
'playlist' => ! empty( $vars['v'] ) ? $vars['v'] : '',
'loop' => 1,
),
$match[1]
);
Expand Down
6 changes: 2 additions & 4 deletions base/inc/widgets/base-slider.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,8 @@ public function render_frame( $i, $frame, $controls ) {
$wrapper_attributes['style'][] = 'background-color: ' . esc_attr( $background['color'] );
}

if ( $background['opacity'] >= 1 ) {
if ( ! empty( $background['image'] ) ) {
$wrapper_attributes['style'][] = 'background-image: url(' . esc_url( $background['image'] ) . ')';
}
if ( ! empty( $background['image'] ) && $background['opacity'] >= 1 && empty( $frame['no_output'] ) ) {
$wrapper_attributes['style'][] = 'background-image: url(' . esc_url( $background['image'] ) . ')';
}

if ( ! empty( $background['url'] ) ) {
Expand Down
1 change: 1 addition & 0 deletions compat/block-editor/widget-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public function render_widget_block( $attributes ) {
$attributes['widgetClass'] == 'SiteOrigin_Widget_PostCarousel_Widget' ||
$attributes['widgetClass'] == 'SiteOrigin_Widgets_ContactForm_Widget' ||
$attributes['widgetClass'] == 'SiteOrigin_Widget_Blog_Widget' ||
apply_filters( 'siteorigin_widgets_block_exclude_widget', false, $attributes['widgetClass'], $instance ) ||
// Is WPML active? If so, is there a translation for this page?
(
defined( 'ICL_LANGUAGE_CODE' ) &&
Expand Down
11 changes: 11 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ The Widgets Bundle global interface is available at Plugins > SiteOrigin Widgets

== Changelog ==

= 1.49.0 - 23 April 2023 =
* Features: Updated CSS to Flexbox.
* Features: Added `Space Between Each Feature` setting.
* Features: Ensured all icon alignment states center align on mobile.
* Features: Increased the responsive breakpoint` to 768px.
* Price Table: Added color settings default values.
* Slider: Improved slide background removal.
* Social Media Buttons: Fixed potential `Undefined variable` error.
* Video: Resolved an issue with YouTube video looping.
* Widget Block: Added `siteorigin_widgets_block_exclude_widget`. Developers can exclude widgets from SiteOrigin Widgets Block cache.

= 1.48.0 - 12 April 2023 =
* Slider: Added Height and Responsive Height settings regardless of whether a Foreground Image is present.
* Social Media Buttons: Added Wire Border Color settings.
Expand Down
15 changes: 13 additions & 2 deletions widgets/features/features.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ public function get_widget_form() {
'default' => 3,
),

'feature_space' => array(
'type' => 'measurement',
'label' => __( 'Space between each feature', 'so-widgets-bundle' ),
'default' => '25px',
),

'responsive' => array(
'type' => 'checkbox',
'label' => __( 'Responsive layout', 'so-widgets-bundle' ),
Expand Down Expand Up @@ -304,6 +310,10 @@ public function modify_instance( $instance ) {
unset( $instance['title_tag'] );
}

if ( ! isset( $instance['feature_space'] ) ) {
$instance['feature_space'] = '25px';
}

return $instance;
}

Expand Down Expand Up @@ -345,6 +355,7 @@ public function get_less_variables( $instance ) {
$less_vars['icon_size'] = $instance['icon_size'];
$less_vars['title_tag'] = ! empty( $instance['fonts']['title_options']['tag'] ) ? $instance['fonts']['title_options']['tag'] : 'h5';
$less_vars['per_row'] = $instance['per_row'];
$less_vars['feature_space'] = ! empty( $instance['feature_space'] ) ? $instance['feature_space'] : '25px';
$less_vars['use_icon_size'] = empty( $instance['icon_size_custom'] ) ? 'false' : 'true';
$less_vars['link_feature'] = ! empty( $instance['link_feature'] );
$less_vars['more_text_bottom_align'] = ! empty( $instance['more_text_bottom_align'] ) ? 'true' : 'false';
Expand Down Expand Up @@ -386,8 +397,8 @@ public function get_settings_form() {
'responsive_breakpoint' => array(
'type' => 'measurement',
'label' => __( 'Responsive Breakpoint', 'so-widgets-bundle' ),
'default' => '520px',
'description' => __( 'This setting controls when the features widget will collapse for mobile devices. The default value is 520px', 'so-widgets-bundle' ),
'default' => '780px',
'description' => __( 'This setting controls when the features widget will collapse for mobile devices. The default value is 780px', 'so-widgets-bundle' ),
),
);
}
Expand Down
23 changes: 7 additions & 16 deletions widgets/features/styles/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@more_text_size: default;
@more_text_color: default;
@per_row: 3;
@feature_space: 25px;

@container_size: 84px;
@icon_size: 24px;
Expand All @@ -29,16 +30,15 @@
@responsive_breakpoint: 520px;

.sow-features-list {
.clearfix();
display: flex;
flex-wrap: wrap;
& when ( @more_text_bottom_align = true ) {
align-items: stretch;
display: flex;
flex-wrap: wrap;
}

.sow-features-feature {
.box-sizing(border-box);
padding: 0 25px;
padding: 0 @feature_space;
position: relative;
& when ( @more_text_bottom_align = true ) {
display: flex;
Expand All @@ -49,7 +49,6 @@
@media (min-width: @responsive_breakpoint) {
&:nth-of-type(@{per_row}n+1) {
padding-left: 0;
clear: left;
}

&:nth-of-type(@{per_row}n) {
Expand Down Expand Up @@ -187,10 +186,6 @@
height: 100%;
}

& when not ( @more_text_bottom_align = true ) {
margin: auto;
}

> @{title_tag} {
.font(@title_font, @title_font_weight);
color: @title_color;
Expand Down Expand Up @@ -249,17 +244,12 @@
}
}

.sow-features-clear {
clear: both;
}

@media (max-width: @responsive_breakpoint) {
&.sow-features-responsive {
margin: 0;

.sow-features-feature {
display: block !important;
float: none !important;
margin-bottom: 40px;
width: 100% !important;

Expand All @@ -268,8 +258,9 @@
}
}

.sow-features-clear {
clear: none;
.textwidget,
.textwidget > @{title_tag} {
text-align: center;
}

.sow-icon-container-position-left .sow-icon-container,
Expand Down
6 changes: 2 additions & 4 deletions widgets/features/tpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
);
?>
<div
class="sow-features-feature sow-icon-container-position-<?php echo esc_attr( $feature['container_position'] ); ?> <?php if ( floor( $i / $per_row ) == $last_row ) {
echo 'sow-features-feature-last-row';
} ?>"
style="display: flex; flex-direction: <?php echo $this->get_feature_flex_direction( $feature['container_position'], ! empty( $instance['more_text_bottom_align'] ) ); ?>; float: left; width: <?php echo round( 100 / $per_row, 3 ); ?>%;"
class="sow-features-feature sow-icon-container-position-<?php echo esc_attr( $feature['container_position'] ); ?> <?php if ( floor( $i / $per_row ) == $last_row ) echo 'sow-features-feature-last-row'; ?>"
style="display: flex; flex-direction: <?php echo $this->get_feature_flex_direction( $feature['container_position'], ! empty( $instance['more_text_bottom_align'] ) ); ?>; width: <?php echo round( 100 / $per_row, 3 ); ?>%;"
>
<?php if ( $right_left_read_more ) { ?>
<div class="sow-features-feature-right-left-container" style="display: flex; flex-direction: inherit;">
Expand Down
5 changes: 5 additions & 0 deletions widgets/price-table/price-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,19 @@ public function get_widget_form() {
'header_color' => array(
'type' => 'color',
'label' => __( 'Header background color', 'so-widgets-bundle' ),
'default' => '#65707f',
),

'header_text_color' => array(
'type' => 'color',
'label' => __( 'Header text color', 'so-widgets-bundle' ),
'default' => '#fff',
),

'featured_header_color' => array(
'type' => 'color',
'label' => __( 'Featured header background color', 'so-widgets-bundle' ),
'default' => '#707d8d',
),

'featured_header_text_color' => array(
Expand All @@ -165,11 +168,13 @@ public function get_widget_form() {
'button_color' => array(
'type' => 'color',
'label' => __( 'Button color', 'so-widgets-bundle' ),
'default' => '#41a9d5',
),

'featured_button_color' => array(
'type' => 'color',
'label' => __( 'Featured button color', 'so-widgets-bundle' ),
'default' => '#2e9fcf',
),

'button_new_window' => array(
Expand Down
5 changes: 5 additions & 0 deletions widgets/slider/slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ public function get_template_variables( $instance, $args ) {
$frame['link_attributes'] = $link_atts;

$frame['custom_height'] = ! empty( $instance['design']['height'] ) ? $instance['design']['height'] : 0;

$frame['custom_height'] = ! empty( $instance['design']['height'] ) ? $instance['design']['height'] : 0;
if ( ! empty( $frame['custom_height'] ) && empty( $frame['foreground_image'] )) {
$frame['no_output'] = true;
}
}
}

Expand Down
7 changes: 0 additions & 7 deletions widgets/slider/styles/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@

ul.sow-slider-images {


& when ( isnumber( @slide_height ) ) {
.sow-slider-image {
background: none !important;
}
}

.sow-slider-image-wrapper {
height: @slide_height;

Expand Down
2 changes: 1 addition & 1 deletion widgets/social-media-buttons/social-media-buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public function less_generate_calls_to( $instance, $args ) {
if ( $instance['design']['theme'] == 'wire' ) {
$call .= ! empty( $network['border_color'] ) ? ', @border_color:' . $network['border_color'] : '';
$border_color_hover_fallback = ! empty( $network['border_color'] ) ? ', @button_color_hover:' . $network['border_color'] : '';
$call .= ! empty( $network['border_hover_color'] ) ? ', @border_hover_color:' . $network['border_hover_color'] : $border_hover_color_fallback;
$call .= ! empty( $network['border_hover_color'] ) ? ', @border_hover_color:' . $network['border_hover_color'] : $border_color_hover_fallback;

}
$call .= ');';
Expand Down

0 comments on commit eff7c1f

Please sign in to comment.