Page Builder by SiteOrigin - Version 2.4.23

Version Description

  • 31 January 2016 =
  • Fixed padding issue introduced by new mobile padding setting.
Download this release

Release Info

Developer gpriday
Plugin Icon 128x128 Page Builder by SiteOrigin
Version 2.4.23
Comparing to
See all releases

Code changes from version 2.4.22 to 2.4.23

Files changed (3) hide show
  1. inc/default-styles.php +15 -5
  2. readme.txt +5 -2
  3. siteorigin-panels.php +2 -2
inc/default-styles.php CHANGED
@@ -339,6 +339,11 @@ class SiteOrigin_Panels_Default_Styling {
339
  }
340
  }
341
 
 
 
 
 
 
342
  if( !empty( $args['border_color'] ) ) {
343
  $attributes['style'] .= 'border: 1px solid ' . $args['border_color']. ';';
344
  }
@@ -416,6 +421,11 @@ class SiteOrigin_Panels_Default_Styling {
416
  }
417
  }
418
 
 
 
 
 
 
419
  if( !empty( $args['border_color'] ) ) {
420
  $attributes['style'] .= 'border: 1px solid ' . $args['border_color']. ';';
421
  }
@@ -443,12 +453,12 @@ class SiteOrigin_Panels_Default_Styling {
443
  if( empty( $widget[ 'panels_info' ] ) ) continue;
444
 
445
  if( ! empty( $widget[ 'panels_info' ][ 'style' ][ 'padding' ] ) ) {
446
- $css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['id'], '', array(
447
  'padding' => $widget[ 'panels_info' ][ 'style' ][ 'padding' ]
448
  ) );
449
  }
450
  if( ! empty( $widget[ 'panels_info' ][ 'style' ][ 'mobile_padding' ] ) ) {
451
- $css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['id'], '', array(
452
  'padding' => $widget[ 'panels_info' ][ 'style' ][ 'mobile_padding' ]
453
  ), $mobile_width );
454
  }
@@ -456,15 +466,15 @@ class SiteOrigin_Panels_Default_Styling {
456
 
457
  // Add in the row padding styling
458
  foreach( $panels_data[ 'grids' ] as $i => $row ) {
459
- if( empty( $widget[ 'style' ] ) ) continue;
460
 
461
  if( ! empty( $row['style']['padding'] ) ) {
462
- $css->add_row_css( $post_id, $i, '', array(
463
  'padding' => $row['style']['padding']
464
  ) );
465
  }
466
  if( ! empty( $row['style'][ 'mobile_padding' ] ) ) {
467
- $css->add_row_css( $post_id, $i, '', array(
468
  'padding' => $row['style'][ 'mobile_padding' ]
469
  ), $mobile_width );
470
  }
339
  }
340
  }
341
 
342
+ // We need the style wrapper if there is padding or mobile padding
343
+ if( ! empty( $args[ 'padding' ] ) || ! empty( $args[ 'mobile_padding' ] ) ) {
344
+ $attributes['class'][] = 'panel-row-style';
345
+ }
346
+
347
  if( !empty( $args['border_color'] ) ) {
348
  $attributes['style'] .= 'border: 1px solid ' . $args['border_color']. ';';
349
  }
421
  }
422
  }
423
 
424
+ // We need the style wrapper if there is padding or mobile padding
425
+ if( ! empty( $args[ 'padding' ] ) || ! empty( $args[ 'mobile_padding' ] ) ) {
426
+ $attributes['class'][] = 'panel-widget-style';
427
+ }
428
+
429
  if( !empty( $args['border_color'] ) ) {
430
  $attributes['style'] .= 'border: 1px solid ' . $args['border_color']. ';';
431
  }
453
  if( empty( $widget[ 'panels_info' ] ) ) continue;
454
 
455
  if( ! empty( $widget[ 'panels_info' ][ 'style' ][ 'padding' ] ) ) {
456
+ $css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['cell_index'], '.panel-widget-style', array(
457
  'padding' => $widget[ 'panels_info' ][ 'style' ][ 'padding' ]
458
  ) );
459
  }
460
  if( ! empty( $widget[ 'panels_info' ][ 'style' ][ 'mobile_padding' ] ) ) {
461
+ $css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['cell_index'], '.panel-widget-style', array(
462
  'padding' => $widget[ 'panels_info' ][ 'style' ][ 'mobile_padding' ]
463
  ), $mobile_width );
464
  }
466
 
467
  // Add in the row padding styling
468
  foreach( $panels_data[ 'grids' ] as $i => $row ) {
469
+ if( empty( $row[ 'style' ] ) ) continue;
470
 
471
  if( ! empty( $row['style']['padding'] ) ) {
472
+ $css->add_row_css( $post_id, $i, '.panel-row-style', array(
473
  'padding' => $row['style']['padding']
474
  ) );
475
  }
476
  if( ! empty( $row['style'][ 'mobile_padding' ] ) ) {
477
+ $css->add_row_css( $post_id, $i, '.panel-row-style', array(
478
  'padding' => $row['style'][ 'mobile_padding' ]
479
  ), $mobile_width );
480
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
3
  Requires at least: 4.0
4
  Tested up to: 4.7.2
5
- Stable tag: 2.4.22
6
- Build time: 2017-01-31T15:53:35+02:00
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
  Donate link: https://siteorigin.com/downloads/contribution/
@@ -96,6 +96,9 @@ We've tried to ensure that Page Builder is compatible with most plugin widgets.
96
 
97
  == Changelog ==
98
 
 
 
 
99
  = 2.4.22 - 31 January 2016 =
100
  * Add WP Color Picker as a dependency for admin script.
101
  * Include and check post ID in Live Editor. Fixes some issues with widgets using the_excerpt in Live Editor.
2
  Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
3
  Requires at least: 4.0
4
  Tested up to: 4.7.2
5
+ Stable tag: 2.4.23
6
+ Build time: 2017-01-31T18:02:58+02:00
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
  Donate link: https://siteorigin.com/downloads/contribution/
96
 
97
  == Changelog ==
98
 
99
+ = 2.4.23 - 31 January 2016 =
100
+ * Fixed padding issue introduced by new mobile padding setting.
101
+
102
  = 2.4.22 - 31 January 2016 =
103
  * Add WP Color Picker as a dependency for admin script.
104
  * Include and check post ID in Live Editor. Fixes some issues with widgets using the_excerpt in Live Editor.
siteorigin-panels.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
- Version: 2.4.22
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
@@ -11,7 +11,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
- define('SITEORIGIN_PANELS_VERSION', '2.4.22');
15
  if ( ! defined('SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define('SITEORIGIN_PANELS_JS_SUFFIX', '.min');
17
  }
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
+ Version: 2.4.23
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
+ define('SITEORIGIN_PANELS_VERSION', '2.4.23');
15
  if ( ! defined('SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define('SITEORIGIN_PANELS_JS_SUFFIX', '.min');
17
  }