Version Description
- 31 August 2017 =
- Avoid using relative paths in asset URLs.
- Fixed compat with latest Elementor update.
Download this release
Release Info
Developer | gpriday |
Plugin | SiteOrigin Widgets Bundle |
Version | 1.9.9 |
Comparing to | |
See all releases |
Code changes from version 1.9.8 to 1.9.9
- admin/tpl/admin.php +3 -3
- base/base.php +12 -0
- base/inc/actions.php +1 -1
- compat/elementor/elementor.php +1 -1
- readme.txt +6 -2
- so-widgets-bundle.php +2 -2
- widgets/button/button.php +32 -40
- widgets/price-table/price-table.php +8 -6
- widgets/slider/slider.php +2 -2
admin/tpl/admin.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
<div class="page-banner">
|
3 |
|
4 |
<span class="icon">
|
5 |
-
<img src="<?php echo
|
6 |
-
<img src="<?php echo
|
7 |
-
<img src="<?php echo
|
8 |
</span>
|
9 |
<h1><?php _e('SiteOrigin Widgets Bundle', 'so-widgets-bundle') ?></h1>
|
10 |
|
2 |
<div class="page-banner">
|
3 |
|
4 |
<span class="icon">
|
5 |
+
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-back.png' )?>" class="icon-back" width="50" height="43">
|
6 |
+
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-gear.png' ) ?>" class="icon-gear" width="26" height="26">
|
7 |
+
<img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-front.png' ) ?>" class="icon-front" width="50" height="43">
|
8 |
</span>
|
9 |
<h1><?php _e('SiteOrigin Widgets Bundle', 'so-widgets-bundle') ?></h1>
|
10 |
|
base/base.php
CHANGED
@@ -239,3 +239,15 @@ function siteorigin_widgets_get_measurements_list() {
|
|
239 |
// Allow themes and plugins to trim or enhance the list.
|
240 |
return apply_filters('siteorigin_widgets_get_measurements_list', $measurements);
|
241 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
// Allow themes and plugins to trim or enhance the list.
|
240 |
return apply_filters('siteorigin_widgets_get_measurements_list', $measurements);
|
241 |
}
|
242 |
+
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Returns the base URL of our widget with `$path` appended.
|
246 |
+
*
|
247 |
+
* @param string $path Extra path to append to the end of the URL.
|
248 |
+
*
|
249 |
+
* @return string Base URL of the widget, with $path appended.
|
250 |
+
*/
|
251 |
+
function siteorigin_widgets_url( $path = '' ) {
|
252 |
+
return plugins_url( 'so-widgets-bundle/' . $path );
|
253 |
+
}
|
base/inc/actions.php
CHANGED
@@ -27,7 +27,7 @@ function siteorigin_widget_preview_widget_action() {
|
|
27 |
|
28 |
// The theme stylesheet will change how the button looks
|
29 |
wp_enqueue_style( 'theme-css', get_stylesheet_uri(), array(), rand( 0, 65536 ) );
|
30 |
-
wp_enqueue_style( 'so-widget-preview',
|
31 |
|
32 |
$sowb = SiteOrigin_Widgets_Bundle::single();
|
33 |
$sowb->register_general_scripts();
|
27 |
|
28 |
// The theme stylesheet will change how the button looks
|
29 |
wp_enqueue_style( 'theme-css', get_stylesheet_uri(), array(), rand( 0, 65536 ) );
|
30 |
+
wp_enqueue_style( 'so-widget-preview', siteorigin_widgets_url( 'base/css/preview.css' ), array(), rand( 0,65536 ) );
|
31 |
|
32 |
$sowb = SiteOrigin_Widgets_Bundle::single();
|
33 |
$sowb->register_general_scripts();
|
compat/elementor/elementor.php
CHANGED
@@ -100,7 +100,7 @@ class SiteOrigin_Widgets_Bundle_Elementor {
|
|
100 |
}
|
101 |
|
102 |
function ajax_render_widget_preview() {
|
103 |
-
|
104 |
add_filter( 'elementor/widget/render_content', array( $this, 'render_widget_preview' ) );
|
105 |
}
|
106 |
|
100 |
}
|
101 |
|
102 |
function ajax_render_widget_preview() {
|
103 |
+
add_filter( 'siteorigin_widgets_is_preview', '__return_true' );
|
104 |
add_filter( 'elementor/widget/render_content', array( $this, 'render_widget_preview' ) );
|
105 |
}
|
106 |
|
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: 4.2
|
4 |
Tested up to: 4.8.1
|
5 |
-
Stable tag: 1.9.
|
6 |
-
Build time: 2017-08-
|
7 |
License: GPLv3 or later
|
8 |
Contributors: gpriday, braam-genis
|
9 |
Donate link: https://siteorigin.com/downloads/contribution/
|
@@ -54,6 +54,10 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
|
|
57 |
= 1.9.8 - 21 August 2017 =
|
58 |
* Use WordPress functions to exit AJAX actions.
|
59 |
* TinyMCE field: Initialized once.
|
2 |
Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
|
3 |
Requires at least: 4.2
|
4 |
Tested up to: 4.8.1
|
5 |
+
Stable tag: 1.9.9
|
6 |
+
Build time: 2017-08-31T10:00:26+02:00
|
7 |
License: GPLv3 or later
|
8 |
Contributors: gpriday, braam-genis
|
9 |
Donate link: https://siteorigin.com/downloads/contribution/
|
54 |
|
55 |
== Changelog ==
|
56 |
|
57 |
+
= 1.9.9 - 31 August 2017 =
|
58 |
+
* Avoid using relative paths in asset URLs.
|
59 |
+
* Fixed compat with latest Elementor update.
|
60 |
+
|
61 |
= 1.9.8 - 21 August 2017 =
|
62 |
* Use WordPress functions to exit AJAX actions.
|
63 |
* TinyMCE field: Initialized once.
|
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.9.
|
6 |
Text Domain: so-widgets-bundle
|
7 |
Domain Path: /lang
|
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.9.
|
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.9.9
|
6 |
Text Domain: so-widgets-bundle
|
7 |
Domain Path: /lang
|
8 |
Author: SiteOrigin
|
12 |
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
13 |
*/
|
14 |
|
15 |
+
define('SOW_BUNDLE_VERSION', '1.9.9');
|
16 |
define('SOW_BUNDLE_BASE_FILE', __FILE__);
|
17 |
|
18 |
// Allow JS suffix to be pre-set
|
widgets/button/button.php
CHANGED
@@ -320,46 +320,38 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
|
|
320 |
*
|
321 |
* @return mixed
|
322 |
*/
|
323 |
-
function modify_instance($instance){
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
if(
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
unset($instance['rounding']);
|
356 |
-
unset($instance['padding']);
|
357 |
-
}
|
358 |
-
|
359 |
-
if( empty($instance['attributes']) ) {
|
360 |
-
$instance['attributes'] = array();
|
361 |
-
if(isset($instance['id'])) $instance['attributes']['id'] = $instance['id'];
|
362 |
-
unset($instance['id']);
|
363 |
}
|
364 |
|
365 |
return $instance;
|
320 |
*
|
321 |
* @return mixed
|
322 |
*/
|
323 |
+
function modify_instance( $instance ) {
|
324 |
+
$migrate_props = array(
|
325 |
+
'button_icon' => array(
|
326 |
+
'icon_selected',
|
327 |
+
'icon_color',
|
328 |
+
'icon',
|
329 |
+
),
|
330 |
+
'design' => array(
|
331 |
+
'align',
|
332 |
+
'theme',
|
333 |
+
'button_color',
|
334 |
+
'text_color',
|
335 |
+
'hover',
|
336 |
+
'font_size',
|
337 |
+
'rounding',
|
338 |
+
'padding',
|
339 |
+
),
|
340 |
+
'attributes' => array(
|
341 |
+
'id'
|
342 |
+
),
|
343 |
+
);
|
344 |
+
|
345 |
+
foreach ( $migrate_props as $prop => $sub_props ) {
|
346 |
+
if ( empty( $instance[ $prop ] ) ) {
|
347 |
+
$instance[ $prop ] = array();
|
348 |
+
foreach ( $sub_props as $sub_prop ) {
|
349 |
+
if ( isset( $instance[ $sub_prop ] ) ) {
|
350 |
+
$instance[ $prop ][ $sub_prop ] = $instance[ $sub_prop ];
|
351 |
+
unset( $instance[ $sub_prop ] );
|
352 |
+
}
|
353 |
+
}
|
354 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
}
|
356 |
|
357 |
return $instance;
|
widgets/price-table/price-table.php
CHANGED
@@ -223,14 +223,16 @@ class SiteOrigin_Widget_PriceTable_Widget extends SiteOrigin_Widget {
|
|
223 |
function get_template_variables( $instance, $args ) {
|
224 |
$columns = array();
|
225 |
$any_column_has_image = false;
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
231 |
}
|
|
|
232 |
}
|
233 |
-
$columns[] = $column;
|
234 |
}
|
235 |
|
236 |
return array(
|
223 |
function get_template_variables( $instance, $args ) {
|
224 |
$columns = array();
|
225 |
$any_column_has_image = false;
|
226 |
+
if( ! empty( $instance[ 'columns' ] ) ) {
|
227 |
+
foreach ( $instance['columns'] as $column ) {
|
228 |
+
$any_column_has_image = $any_column_has_image || ! empty( $column['image'] );
|
229 |
+
if ( ! empty( $column['features'] ) ) {
|
230 |
+
foreach ( $column['features'] as &$feature ) {
|
231 |
+
$feature['text'] = do_shortcode( $feature['text'] );
|
232 |
+
}
|
233 |
}
|
234 |
+
$columns[] = $column;
|
235 |
}
|
|
|
236 |
}
|
237 |
|
238 |
return array(
|
widgets/slider/slider.php
CHANGED
@@ -192,7 +192,7 @@ class SiteOrigin_Widget_Slider_Widget extends SiteOrigin_Widget_Base_Slider {
|
|
192 |
}
|
193 |
|
194 |
function get_template_variables( $instance, $args ) {
|
195 |
-
$frames = $instance['frames'];
|
196 |
if ( ! empty( $frames ) ) {
|
197 |
foreach ( $frames as &$frame ) {
|
198 |
$link_atts = array();
|
@@ -204,7 +204,7 @@ class SiteOrigin_Widget_Slider_Widget extends SiteOrigin_Widget_Base_Slider {
|
|
204 |
}
|
205 |
return array(
|
206 |
'controls' => $instance['controls'],
|
207 |
-
'frames' =>
|
208 |
);
|
209 |
}
|
210 |
|
192 |
}
|
193 |
|
194 |
function get_template_variables( $instance, $args ) {
|
195 |
+
$frames = empty( $instance['frames'] ) ? array() : $instance['frames'];
|
196 |
if ( ! empty( $frames ) ) {
|
197 |
foreach ( $frames as &$frame ) {
|
198 |
$link_atts = array();
|
204 |
}
|
205 |
return array(
|
206 |
'controls' => $instance['controls'],
|
207 |
+
'frames' => $frames,
|
208 |
);
|
209 |
}
|
210 |
|