SiteOrigin Widgets Bundle - Version 1.8.1

Version Description

  • 3 February 2017 =
  • Fixed empty array warning.
  • Contact Form: Prevent empty title markup from being echoed.
  • Contact Form: Display email after name
  • Slider: Account for 0 speed.
  • Features: Fix sizing issue when using images instead of icons.
  • Use default unit if missing for measurement fields.
  • Price Table: Shortcode support for feature text.
  • Testimonial: Updated text radius label and fixed resulting functionality.
  • Revert change made to post search for link field.
  • Link Field: Make sure we have a valid post_types value.
Download this release

Release Info

Developer gpriday
Plugin Icon 128x128 SiteOrigin Widgets Bundle
Version 1.8.1
Comparing to
See all releases

Code changes from version 1.8 to 1.8.1

base/inc/actions.php CHANGED
@@ -65,8 +65,7 @@ function siteorigin_widget_search_posts_action(){
65
66
// Get all public post types, besides attachments
67
$post_types = (array) get_post_types( array(
68
- 'public' => true,
69
- 'publicly_queryable' => true
70
) );
71
72
if ( ! empty( $_REQUEST['postTypes'] ) ) {
65
66
// Get all public post types, besides attachments
67
$post_types = (array) get_post_types( array(
68
+ 'public' => true
69
) );
70
71
if ( ! empty( $_REQUEST['postTypes'] ) ) {
base/inc/fields/link.class.php CHANGED
@@ -15,6 +15,13 @@ class SiteOrigin_Widget_Field_Link extends SiteOrigin_Widget_Field_Text_Input_Ba
15
16
protected function render_before_field( $value, $instance ) {
17
parent::render_before_field( $value, $instance );
18
?>
19
<a href="#" class="select-content-button button button-small"><?php esc_html_e('Select Content', 'so-widgets-bundle') ?></a>
20
<div class="existing-content-selector">
15
16
protected function render_before_field( $value, $instance ) {
17
parent::render_before_field( $value, $instance );
18
+ if( is_string( $this->post_types ) ) {
19
+ $this->post_types = array( $this->post_types );
20
+ }
21
+ else if ( ! is_array( $this->post_types ) ) {
22
+ $this->post_types = array();
23
+ }
24
+
25
?>
26
<a href="#" class="select-content-button button button-small"><?php esc_html_e('Select Content', 'so-widgets-bundle') ?></a>
27
<div class="existing-content-selector">
base/inc/fields/measurement.class.php CHANGED
@@ -80,6 +80,11 @@ class SiteOrigin_Widget_Field_Measurement extends SiteOrigin_Widget_Field_Text_I
80
unset( $instance[ $unit_name ] );
81
}
82
83
$value = ( $value === '' ) ? false : ( (float) $value ) . $unit;
84
return $value;
85
}
80
unset( $instance[ $unit_name ] );
81
}
82
83
+ // Sensible default, if we somehow end up without a unit.
84
+ if ( empty( $unit ) ) {
85
+ $unit = 'px';
86
+ }
87
+
88
$value = ( $value === '' ) ? false : ( (float) $value ) . $unit;
89
return $value;
90
}
base/inc/widgets/base-slider.class.php CHANGED
@@ -137,9 +137,9 @@ abstract class SiteOrigin_Widget_Base_Slider extends SiteOrigin_Widget {
137
function slider_settings( $controls ){
138
return array(
139
'pagination' => true,
140
- 'speed' => $controls['speed'],
141
- 'timeout' => $controls['timeout'],
142
- 'swipe' => $controls['swipe'],
143
);
144
}
145
137
function slider_settings( $controls ){
138
return array(
139
'pagination' => true,
140
+ 'speed' => empty( $controls['speed'] ) ? 1 : $controls['speed'],
141
+ 'timeout' => $controls['timeout'],
142
+ 'swipe' => $controls['swipe'],
143
);
144
}
145
base/siteorigin-widget.class.php CHANGED
@@ -355,6 +355,14 @@ abstract class SiteOrigin_Widget extends WP_Widget {
355
}
356
$instance[$id] = $this->add_defaults( $field['fields'], $instance[$id], $level + 1 );
357
}
358
else {
359
if( !isset( $instance[$id] ) ) {
360
$instance[$id] = isset( $field['default'] ) ? $field['default'] : '';
355
}
356
$instance[$id] = $this->add_defaults( $field['fields'], $instance[$id], $level + 1 );
357
}
358
+ else if( $field['type'] == 'measurement' ) {
359
+ if( ! isset( $instance[$id] ) ) {
360
+ $instance[$id] = isset( $field['default'] ) ? $field['default'] : '';
361
+ }
362
+ if ( ! isset( $instance[ $id . '_unit' ] ) || empty( $instance[ $id . '_unit' ] ) ) {
363
+ $instance[ $id . '_unit' ] = 'px';
364
+ }
365
+ }
366
else {
367
if( !isset( $instance[$id] ) ) {
368
$instance[$id] = isset( $field['default'] ) ? $field['default'] : '';
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
Requires at least: 3.9
4
Tested up to: 4.7.2
5
- Stable tag: 1.8
6
- Build time: 2017-01-31T13:37:28+02:00
7
License: GPLv3 or later
8
Contributors: gpriday, braam-genis
9
Donate link: https://siteorigin.com/downloads/contribution/
@@ -52,6 +52,18 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
52
53
== Changelog ==
54
55
= 1.8 - 31 January 2017 =
56
* Introduced compatibility system.
57
* Added compatibility with Elementor and Beaver Builder.
2
Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
Requires at least: 3.9
4
Tested up to: 4.7.2
5
+ Stable tag: 1.8.1
6
+ Build time: 2017-02-03T17:54:58+02:00
7
License: GPLv3 or later
8
Contributors: gpriday, braam-genis
9
Donate link: https://siteorigin.com/downloads/contribution/
52
53
== Changelog ==
54
55
+ = 1.8.1 - 3 February 2017 =
56
+ * Fixed empty array warning.
57
+ * Contact Form: Prevent empty title markup from being echoed.
58
+ * Contact Form: Display email after name
59
+ * Slider: Account for 0 speed.
60
+ * Features: Fix sizing issue when using images instead of icons.
61
+ * Use default unit if missing for measurement fields.
62
+ * Price Table: Shortcode support for feature text.
63
+ * Testimonial: Updated text radius label and fixed resulting functionality.
64
+ * Revert change made to post search for link field.
65
+ * Link Field: Make sure we have a valid post_types value.
66
+
67
= 1.8 - 31 January 2017 =
68
* Introduced compatibility system.
69
* Added compatibility with Elementor and Beaver Builder.
so-widgets-bundle.php CHANGED
@@ -2,7 +2,7 @@
2
/*
3
Plugin Name: SiteOrigin Widgets Bundle
4
Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
- Version: 1.8
6
Text Domain: so-widgets-bundle
7
Domain Path: /languages
8
Author: SiteOrigin
@@ -12,7 +12,7 @@ License: GPL3
12
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
*/
14
15
- define('SOW_BUNDLE_VERSION', '1.8');
16
define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
18
// Allow JS suffix to be pre-set
2
/*
3
Plugin Name: SiteOrigin Widgets Bundle
4
Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
+ Version: 1.8.1
6
Text Domain: so-widgets-bundle
7
Domain Path: /languages
8
Author: SiteOrigin
12
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
*/
14
15
+ define('SOW_BUNDLE_VERSION', '1.8.1');
16
define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
18
// Allow JS suffix to be pre-set
widgets/contact/contact.php CHANGED
@@ -993,7 +993,7 @@ class SiteOrigin_Widgets_ContactForm_Widget extends SiteOrigin_Widget {
993
}
994
995
function send_mail( $email_fields, $instance ){
996
- $body = '<strong>From:</strong> <a href="mailto:' . sanitize_email( $email_fields['email'] ) . '">' . esc_html( $email_fields['name'] ) . "</a>\n\n";
997
foreach( $email_fields['message'] as $m ) {
998
$body .= '<strong>' . $m['label'] . ':</strong>';
999
$body .= "\n";
993
}
994
995
function send_mail( $email_fields, $instance ){
996
+ $body = '<strong>From:</strong> <a href="mailto:' . sanitize_email( $email_fields['email'] ) . '">' . esc_html( $email_fields['name'] ) . '</a> &#60;' . sanitize_email( $email_fields['email'] ) . "&#62; \n\n";
997
foreach( $email_fields['message'] as $m ) {
998
$body .= '<strong>' . $m['label'] . ':</strong>';
999
$body .= "\n";
widgets/contact/tpl/default.php CHANGED
@@ -2,7 +2,7 @@
2
$result = $this->contact_form_action( $instance, $instance_hash );
3
4
// Display the title
5
- if( $instance['display_title'] ) {
6
echo $args['before_title'] . $instance['title'] . $args['after_title'];
7
}
8
$short_hash = substr( $instance_hash, 0, 4 );
2
$result = $this->contact_form_action( $instance, $instance_hash );
3
4
// Display the title
5
+ if( $instance['display_title'] && !empty( $instance['title'] ) ) {
6
echo $args['before_title'] . $instance['title'] . $args['after_title'];
7
}
8
$short_hash = substr( $instance_hash, 0, 4 );
widgets/features/css/style.css CHANGED
@@ -43,6 +43,8 @@
43
top: 50%;
44
margin-top: -0.5em;
45
background-size: contain;
46
}
47
.sow-features-list .sow-features-feature h5 {
48
margin: 1em 0;
43
top: 50%;
44
margin-top: -0.5em;
45
background-size: contain;
46
+ background-repeat: no-repeat;
47
+ background-position: center;
48
}
49
.sow-features-list .sow-features-feature h5 {
50
margin: 1em 0;
widgets/price-table/tpl/atom.php CHANGED
@@ -38,7 +38,7 @@
38
?>
39
<div class="sow-feature-text">
40
<p <?php if(!empty( $feature['hover'] ) ) : ?>data-tooltip-text="<?php echo esc_attr($feature['hover']) ?>"<?php endif; ?>>
41
- <?php echo wp_kses_post($feature['text']) ?>
42
</p>
43
</div>
44
</div>
38
?>
39
<div class="sow-feature-text">
40
<p <?php if(!empty( $feature['hover'] ) ) : ?>data-tooltip-text="<?php echo esc_attr($feature['hover']) ?>"<?php endif; ?>>
41
+ <?php echo wp_kses_post( do_shortcode( $feature['text'] ) ) ?>
42
</p>
43
</div>
44
</div>
widgets/testimonial/styles/default.less CHANGED
@@ -37,7 +37,7 @@
37
background: @text_background;
38
color: @text_color;
39
padding: @testimonial_padding @testimonial_padding*1.5;
40
- .border-radius(@text_border_radius);
41
}
42
43
.sow-round-image-frame {
37
background: @text_background;
38
color: @text_color;
39
padding: @testimonial_padding @testimonial_padding*1.5;
40
+ .rounded(@text_border_radius);
41
}
42
43
.sow-round-image-frame {
widgets/testimonial/testimonial.php CHANGED
@@ -223,7 +223,7 @@ class SiteOrigin_Widgets_Testimonials_Widget extends SiteOrigin_Widget {
223
224
'border_radius' => array(
225
'type' => 'slider',
226
- 'label' => __('Padding', 'so-widgets-bundle'),
227
'integer' => true,
228
'default' => 4,
229
'max' => 100,
223
224
'border_radius' => array(
225
'type' => 'slider',
226
+ 'label' => __( 'Testimonial Radius', 'so-widgets-bundle' ),
227
'integer' => true,
228
'default' => 4,
229
'max' => 100,