Page Builder by SiteOrigin - Version 2.16.8

Version Description

  • 30 March 2022 =
  • Improved PHP 8 Compatibility: Replaced GLOB_BRACE flag in favor of multiple glob functions.
  • Developer: Added siteorigin_panels_output_row and siteorigin_panels_output_widget filters.
Download this release

Release Info

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

Code changes from version 2.16.7 to 2.16.8

inc/admin-layouts.php CHANGED
@@ -158,12 +158,27 @@ class SiteOrigin_Panels_Admin_Layouts {
158
  return $fallback;
159
  }
160
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
 
162
  private function get_layout_file_screenshot( $panels_data, $folder_path, $file_name ) {
163
  if ( ! empty( $panels_data['screenshot'] ) ) {
164
  return $panels_data['screenshot'];
165
  } else {
166
- $paths = glob( $folder_path . "/$file_name.{jpg,jpeg,gif,png}", GLOB_BRACE );
167
  // Highlander Condition. There can be only one.
168
  $screenshot_path = empty( $paths ) ? '' : wp_normalize_path( $paths[0] );
169
  $wp_content_dir = wp_normalize_path( WP_CONTENT_DIR );
158
  return $fallback;
159
  }
160
  }
161
+
162
+ static private function get_files( $folder_path, $file_name ) {
163
+ $paths = array();
164
+ $types = array (
165
+ 'jpg',
166
+ 'jpeg',
167
+ 'gif',
168
+ 'png',
169
+ );
170
+ foreach ( $types as $ext ) {
171
+ $paths = array_merge( glob( $folder_path . "/$file_name.$ext" ), $paths );
172
+ }
173
+
174
+ return $paths;
175
+ }
176
 
177
  private function get_layout_file_screenshot( $panels_data, $folder_path, $file_name ) {
178
  if ( ! empty( $panels_data['screenshot'] ) ) {
179
  return $panels_data['screenshot'];
180
  } else {
181
+ $paths = self::get_files( $folder_path, $file_name );
182
  // Highlander Condition. There can be only one.
183
  $screenshot_path = empty( $paths ) ? '' : wp_normalize_path( $paths[0] );
184
  $wp_content_dir = wp_normalize_path( WP_CONTENT_DIR );
inc/renderer.php CHANGED
@@ -487,7 +487,9 @@ class SiteOrigin_Panels_Renderer {
487
  echo apply_filters( 'siteorigin_panels_before_content', '', $panels_data, $post_id );
488
 
489
  foreach ( $layout_data as $ri => & $row ) {
490
- $this->render_row( $post_id, $ri, $row, $panels_data );
 
 
491
  }
492
 
493
  echo apply_filters( 'siteorigin_panels_after_content', '', $panels_data, $post_id );
@@ -1018,7 +1020,9 @@ class SiteOrigin_Panels_Renderer {
1018
 
1019
  foreach ( $cell['widgets'] as $wi => & $widget ) {
1020
  $is_last = ( $wi == count( $cell['widgets'] ) - 1 );
1021
- $this->render_widget( $post_id, $ri, $ci, $wi, $widget, $is_last );
 
 
1022
  }
1023
 
1024
  // This allows other themes and plugins to add HTML inside of the cell after its contents.
487
  echo apply_filters( 'siteorigin_panels_before_content', '', $panels_data, $post_id );
488
 
489
  foreach ( $layout_data as $ri => & $row ) {
490
+ if ( apply_filters( 'siteorigin_panels_output_row', true, $row, $ri, $panels_data, $post_id ) ) {
491
+ $this->render_row( $post_id, $ri, $row, $panels_data );
492
+ }
493
  }
494
 
495
  echo apply_filters( 'siteorigin_panels_after_content', '', $panels_data, $post_id );
1020
 
1021
  foreach ( $cell['widgets'] as $wi => & $widget ) {
1022
  $is_last = ( $wi == count( $cell['widgets'] ) - 1 );
1023
+ if ( apply_filters( 'siteorigin_panels_output_widget', true, $widget, $ri, $ci, $wi, $panels_data, $post_id ) ) {
1024
+ $this->render_widget( $post_id, $ri, $ci, $wi, $widget, $is_last );
1025
+ }
1026
  }
1027
 
1028
  // This allows other themes and plugins to add HTML inside of the cell after its contents.
lang/siteorigin-panels.pot CHANGED
@@ -85,31 +85,31 @@ msgstr ""
85
  msgid "Get Premium"
86
  msgstr ""
87
 
88
- #: inc/admin-layouts.php:40, inc/admin-layouts.php:222
89
  msgid "Layouts Directory"
90
  msgstr ""
91
 
92
- #: inc/admin-layouts.php:186
93
  msgid "Invalid request."
94
  msgstr ""
95
 
96
- #: inc/admin-layouts.php:201
97
  msgid "Theme Defined Layouts"
98
  msgstr ""
99
 
100
- #: inc/admin-layouts.php:272
101
  msgid "Clone %s"
102
  msgstr ""
103
 
104
- #: inc/admin-layouts.php:310
105
  msgid " - Results For:"
106
  msgstr ""
107
 
108
- #: inc/admin-layouts.php:343
109
  msgid "Missing layout ID or no such layout exists"
110
  msgstr ""
111
 
112
- #: inc/admin-layouts.php:389
113
  msgid "There was a problem fetching the layout. Please try again later."
114
  msgstr ""
115
 
85
  msgid "Get Premium"
86
  msgstr ""
87
 
88
+ #: inc/admin-layouts.php:40, inc/admin-layouts.php:237
89
  msgid "Layouts Directory"
90
  msgstr ""
91
 
92
+ #: inc/admin-layouts.php:201
93
  msgid "Invalid request."
94
  msgstr ""
95
 
96
+ #: inc/admin-layouts.php:216
97
  msgid "Theme Defined Layouts"
98
  msgstr ""
99
 
100
+ #: inc/admin-layouts.php:287
101
  msgid "Clone %s"
102
  msgstr ""
103
 
104
+ #: inc/admin-layouts.php:325
105
  msgid " - Results For:"
106
  msgstr ""
107
 
108
+ #: inc/admin-layouts.php:358
109
  msgid "Missing layout ID or no such layout exists"
110
  msgstr ""
111
 
112
+ #: inc/admin-layouts.php:404
113
  msgid "There was a problem fetching the layout. Please try again later."
114
  msgstr ""
115
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: page builder, responsive, parallax, widgets, blocks, gallery, layout, grid
3
  Requires at least: 4.7
4
  Tested up to: 5.9
5
  Requires PHP: 5.6.20
6
- Stable tag: 2.16.7
7
- Build time: 2022-03-23T14:50:16+02:00
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -107,6 +107,10 @@ SiteOrigin Premium includes access to our professional email support service, pe
107
 
108
  == Changelog ==
109
 
 
 
 
 
110
  = 2.16.7 - 23 March 2022 =
111
  * Improved empty CSS rule check to avoid potential edge cases.
112
 
3
  Requires at least: 4.7
4
  Tested up to: 5.9
5
  Requires PHP: 5.6.20
6
+ Stable tag: 2.16.8
7
+ Build time: 2022-03-30T13:21:20+02:00
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
  Donate link: https://siteorigin.com/downloads/premium/
107
 
108
  == Changelog ==
109
 
110
+ = 2.16.8 - 30 March 2022 =
111
+ * Improved PHP 8 Compatibility: Replaced `GLOB_BRACE` flag in favor of multiple `glob` functions.
112
+ * Developer: Added `siteorigin_panels_output_row` and `siteorigin_panels_output_widget` filters.
113
+
114
  = 2.16.7 - 23 March 2022 =
115
  * Improved empty CSS rule check to avoid potential edge cases.
116
 
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.16.7
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.16.7' );
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.16.8
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.16.8' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }