Version Description
- 3 February 2017 =
- Add row ID to style wrapper instead of actual row.
- Use more specific selectors for padding CSS.
Download this release
Release Info
Developer | gpriday |
Plugin | Page Builder by SiteOrigin |
Version | 2.4.24 |
Comparing to | |
See all releases |
Code changes from version 2.4.23 to 2.4.24
- inc/default-styles.php +8 -4
- readme.txt +8 -4
- siteorigin-panels.php +6 -34
inc/default-styles.php
CHANGED
@@ -348,6 +348,10 @@ class SiteOrigin_Panels_Default_Styling {
|
|
348 |
$attributes['style'] .= 'border: 1px solid ' . $args['border_color']. ';';
|
349 |
}
|
350 |
|
|
|
|
|
|
|
|
|
351 |
return $attributes;
|
352 |
}
|
353 |
|
@@ -453,12 +457,12 @@ class SiteOrigin_Panels_Default_Styling {
|
|
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 |
}
|
@@ -469,12 +473,12 @@ class SiteOrigin_Panels_Default_Styling {
|
|
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 |
}
|
348 |
$attributes['style'] .= 'border: 1px solid ' . $args['border_color']. ';';
|
349 |
}
|
350 |
|
351 |
+
if( !empty( $args['id'] ) ) {
|
352 |
+
$attributes[ 'id' ] = sanitize_html_class( $args[ 'id' ] );
|
353 |
+
}
|
354 |
+
|
355 |
return $attributes;
|
356 |
}
|
357 |
|
457 |
if( empty( $widget[ 'panels_info' ] ) ) continue;
|
458 |
|
459 |
if( ! empty( $widget[ 'panels_info' ][ 'style' ][ 'padding' ] ) ) {
|
460 |
+
$css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['cell_index'], '> .panel-widget-style', array(
|
461 |
'padding' => $widget[ 'panels_info' ][ 'style' ][ 'padding' ]
|
462 |
) );
|
463 |
}
|
464 |
if( ! empty( $widget[ 'panels_info' ][ 'style' ][ 'mobile_padding' ] ) ) {
|
465 |
+
$css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['cell_index'], '> .panel-widget-style', array(
|
466 |
'padding' => $widget[ 'panels_info' ][ 'style' ][ 'mobile_padding' ]
|
467 |
), $mobile_width );
|
468 |
}
|
473 |
if( empty( $row[ 'style' ] ) ) continue;
|
474 |
|
475 |
if( ! empty( $row['style']['padding'] ) ) {
|
476 |
+
$css->add_row_css( $post_id, $i, '> .panel-row-style', array(
|
477 |
'padding' => $row['style']['padding']
|
478 |
) );
|
479 |
}
|
480 |
if( ! empty( $row['style'][ 'mobile_padding' ] ) ) {
|
481 |
+
$css->add_row_css( $post_id, $i, '> .panel-row-style', array(
|
482 |
'padding' => $row['style'][ 'mobile_padding' ]
|
483 |
), $mobile_width );
|
484 |
}
|
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.
|
6 |
-
Build time: 2017-
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
Donate link: https://siteorigin.com/downloads/contribution/
|
@@ -96,10 +96,14 @@ We've tried to ensure that Page Builder is compatible with most plugin widgets.
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
-
= 2.4.
|
|
|
|
|
|
|
|
|
100 |
* Fixed padding issue introduced by new mobile padding setting.
|
101 |
|
102 |
-
= 2.4.22 - 31 January
|
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.
|
105 |
* Added mobile padding settings.
|
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.24
|
6 |
+
Build time: 2017-02-03T14:18:43+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.24 - 3 February 2017 =
|
100 |
+
* Add row ID to style wrapper instead of actual row.
|
101 |
+
* Use more specific selectors for padding CSS.
|
102 |
+
|
103 |
+
= 2.4.23 - 31 January 2017 =
|
104 |
* Fixed padding issue introduced by new mobile padding setting.
|
105 |
|
106 |
+
= 2.4.22 - 31 January 2017 =
|
107 |
* Add WP Color Picker as a dependency for admin script.
|
108 |
* Include and check post ID in Live Editor. Fixes some issues with widgets using the_excerpt in Live Editor.
|
109 |
* Added mobile padding settings.
|
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.
|
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.
|
15 |
if ( ! defined('SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
|
16 |
define('SITEORIGIN_PANELS_JS_SUFFIX', '.min');
|
17 |
}
|
@@ -758,7 +758,7 @@ function siteorigin_panels_generate_css($post_id, $panels_data = false){
|
|
758 |
foreach ( $panels_data['grids'] as $gi => $grid ) {
|
759 |
|
760 |
$cell_count = intval( $grid['cells'] );
|
761 |
-
$grid_id =
|
762 |
|
763 |
// Add the cell sizing
|
764 |
for ( $i = 0; $i < $cell_count; $i++ ) {
|
@@ -855,7 +855,7 @@ function siteorigin_panels_generate_css($post_id, $panels_data = false){
|
|
855 |
|
856 |
// Let other plugins customize various aspects of the rows (grids)
|
857 |
foreach ( $panels_data['grids'] as $gi => $grid ) {
|
858 |
-
$grid_id =
|
859 |
|
860 |
// Let other themes and plugins change the gutter.
|
861 |
$gutter = apply_filters('siteorigin_panels_css_row_gutter', $settings['margin-sides'].'px', $grid, $gi, $panels_data);
|
@@ -1069,11 +1069,10 @@ function siteorigin_panels_render( $post_id = false, $enqueue_css = true, $panel
|
|
1069 |
foreach ( $grids as $gi => $cells ) {
|
1070 |
|
1071 |
$grid_classes = apply_filters( 'siteorigin_panels_row_classes', array( 'panel-grid' ), $panels_data['grids'][$gi] );
|
1072 |
-
$grid_id = !empty($panels_data['grids'][$gi]['style']['id']) ? sanitize_html_class( $panels_data['grids'][$gi]['style']['id'] ) : false;
|
1073 |
|
1074 |
$grid_attributes = apply_filters( 'siteorigin_panels_row_attributes', array(
|
1075 |
'class' => implode( ' ', $grid_classes ),
|
1076 |
-
'id' =>
|
1077 |
), $panels_data['grids'][$gi] );
|
1078 |
|
1079 |
// This allows other themes and plugins to add html before the row
|
@@ -1112,7 +1111,7 @@ function siteorigin_panels_render( $post_id = false, $enqueue_css = true, $panel
|
|
1112 |
$cell_classes = apply_filters( 'siteorigin_panels_row_cell_classes', $cell_classes, $panels_data );
|
1113 |
$cell_attributes = apply_filters( 'siteorigin_panels_row_cell_attributes', array(
|
1114 |
'class' => implode( ' ', $cell_classes ),
|
1115 |
-
'id' => 'pgc-' . $post_id . '-' .
|
1116 |
), $panels_data );
|
1117 |
|
1118 |
echo '<div ';
|
@@ -1584,33 +1583,6 @@ function siteorigin_panels_process_panels_data( $panels_data ){
|
|
1584 |
}
|
1585 |
}
|
1586 |
|
1587 |
-
// Process the IDs of the grids. Make sure that each is unique.
|
1588 |
-
|
1589 |
-
if( !empty($panels_data['grids']) && is_array($panels_data['grids']) ) {
|
1590 |
-
$unique_grid_ids = array();
|
1591 |
-
foreach( $panels_data['grids'] as &$grid ) {
|
1592 |
-
// Make sure that the row ID is unique and non-numeric
|
1593 |
-
if( !empty( $grid['style']['id'] ) ) {
|
1594 |
-
if( is_numeric($grid['style']['id']) ) {
|
1595 |
-
// Numeric IDs will cause problems, so we'll ignore them
|
1596 |
-
$grid['style']['id'] = false;
|
1597 |
-
}
|
1598 |
-
else if( isset( $unique_grid_ids[ $grid['style']['id'] ] ) ) {
|
1599 |
-
// This ID already exists, so add a suffix to make sure it's unique
|
1600 |
-
$original_id = $grid['style']['id'];
|
1601 |
-
$i = 1;
|
1602 |
-
do {
|
1603 |
-
$grid['style']['id'] = $original_id . '-' . (++$i);
|
1604 |
-
} while( isset( $unique_grid_ids[ $grid['style']['id'] ] ) );
|
1605 |
-
}
|
1606 |
-
|
1607 |
-
if( !empty( $grid['style']['id'] ) ) {
|
1608 |
-
$unique_grid_ids[ $grid['style']['id'] ] = true;
|
1609 |
-
}
|
1610 |
-
}
|
1611 |
-
}
|
1612 |
-
}
|
1613 |
-
|
1614 |
return $panels_data;
|
1615 |
}
|
1616 |
add_filter( 'siteorigin_panels_data', 'siteorigin_panels_process_panels_data', 5 );
|
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.24
|
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.24');
|
15 |
if ( ! defined('SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
|
16 |
define('SITEORIGIN_PANELS_JS_SUFFIX', '.min');
|
17 |
}
|
758 |
foreach ( $panels_data['grids'] as $gi => $grid ) {
|
759 |
|
760 |
$cell_count = intval( $grid['cells'] );
|
761 |
+
$grid_id = intval( $gi );
|
762 |
|
763 |
// Add the cell sizing
|
764 |
for ( $i = 0; $i < $cell_count; $i++ ) {
|
855 |
|
856 |
// Let other plugins customize various aspects of the rows (grids)
|
857 |
foreach ( $panels_data['grids'] as $gi => $grid ) {
|
858 |
+
$grid_id = intval( $gi );
|
859 |
|
860 |
// Let other themes and plugins change the gutter.
|
861 |
$gutter = apply_filters('siteorigin_panels_css_row_gutter', $settings['margin-sides'].'px', $grid, $gi, $panels_data);
|
1069 |
foreach ( $grids as $gi => $cells ) {
|
1070 |
|
1071 |
$grid_classes = apply_filters( 'siteorigin_panels_row_classes', array( 'panel-grid' ), $panels_data['grids'][$gi] );
|
|
|
1072 |
|
1073 |
$grid_attributes = apply_filters( 'siteorigin_panels_row_attributes', array(
|
1074 |
'class' => implode( ' ', $grid_classes ),
|
1075 |
+
'id' => 'pg-' . $post_id . '-' . $gi,
|
1076 |
), $panels_data['grids'][$gi] );
|
1077 |
|
1078 |
// This allows other themes and plugins to add html before the row
|
1111 |
$cell_classes = apply_filters( 'siteorigin_panels_row_cell_classes', $cell_classes, $panels_data );
|
1112 |
$cell_attributes = apply_filters( 'siteorigin_panels_row_cell_attributes', array(
|
1113 |
'class' => implode( ' ', $cell_classes ),
|
1114 |
+
'id' => 'pgc-' . $post_id . '-' . $gi . '-' . $ci
|
1115 |
), $panels_data );
|
1116 |
|
1117 |
echo '<div ';
|
1583 |
}
|
1584 |
}
|
1585 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1586 |
return $panels_data;
|
1587 |
}
|
1588 |
add_filter( 'siteorigin_panels_data', 'siteorigin_panels_process_panels_data', 5 );
|