Version Description
- 29 September 2017 =
- Always enqueue parallax when in cache mode.
- Skip saving post meta for revisions in previews.
- Cast post types as string when adding meta boxes.
Download this release
Release Info
Developer | gpriday |
Plugin | Page Builder by SiteOrigin |
Version | 2.5.13 |
Comparing to | |
See all releases |
Code changes from version 2.5.12 to 2.5.13
- inc/admin.php +1 -1
- inc/cache-renderer.php +23 -0
- inc/revisions.php +20 -0
- js/{siteorigin-panels-2512.js → siteorigin-panels-2513.js} +0 -0
- js/{siteorigin-panels-2512.min.js → siteorigin-panels-2513.min.js} +0 -0
- js/{styling-2512.js → styling-2513.js} +0 -0
- js/{styling-2512.min.js → styling-2513.min.js} +0 -0
- lang/siteorigin-panels.pot +3 -3
- readme.txt +8 -3
- siteorigin-panels.php +7 -3
inc/admin.php
CHANGED
@@ -135,7 +135,7 @@ class SiteOrigin_Panels_Admin {
|
|
135 |
'so-panels-panels',
|
136 |
__( 'Page Builder', 'siteorigin-panels' ),
|
137 |
array( $this, 'render_meta_boxes' ),
|
138 |
-
$type,
|
139 |
'advanced',
|
140 |
'high'
|
141 |
);
|
135 |
'so-panels-panels',
|
136 |
__( 'Page Builder', 'siteorigin-panels' ),
|
137 |
array( $this, 'render_meta_boxes' ),
|
138 |
+
( string ) $type,
|
139 |
'advanced',
|
140 |
'high'
|
141 |
);
|
inc/cache-renderer.php
CHANGED
@@ -64,6 +64,8 @@ class SiteOrigin_Panels_Cache_Renderer {
|
|
64 |
|
65 |
/**
|
66 |
* Save the generated cache data.
|
|
|
|
|
67 |
*/
|
68 |
public function save( $post_id ){
|
69 |
update_post_meta( $post_id, 'siteorigin_panels_cache', array(
|
@@ -82,6 +84,12 @@ class SiteOrigin_Panels_Cache_Renderer {
|
|
82 |
return $this->cache_render;
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
public function add( $type, $content, $post_id ){
|
86 |
if( ! $this->is_cache_render() ) {
|
87 |
throw new Exception( 'A cache render must be started before adding HTML' );
|
@@ -89,6 +97,13 @@ class SiteOrigin_Panels_Cache_Renderer {
|
|
89 |
$this->cache[ $type ][ $post_id ] .= trim( $content ) . ' ';
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
public function get( $type, $post_id ){
|
93 |
if( ! empty( $this->cache[ $type ][ $post_id ] ) ) {
|
94 |
return $this->cache[ $type ][ $post_id ];
|
@@ -101,6 +116,7 @@ class SiteOrigin_Panels_Cache_Renderer {
|
|
101 |
! empty( $cache_meta[ $type ] ) &&
|
102 |
$cache_meta[ 'version' ] == SITEORIGIN_PANELS_VERSION
|
103 |
) {
|
|
|
104 |
return $cache_meta[ $type ];
|
105 |
}
|
106 |
|
@@ -124,6 +140,13 @@ class SiteOrigin_Panels_Cache_Renderer {
|
|
124 |
}
|
125 |
}
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
private function refresh_cache( $post_id, $save = true ) {
|
128 |
$this->start_cache_render( $post_id );
|
129 |
|
64 |
|
65 |
/**
|
66 |
* Save the generated cache data.
|
67 |
+
*
|
68 |
+
* @param int $post_id
|
69 |
*/
|
70 |
public function save( $post_id ){
|
71 |
update_post_meta( $post_id, 'siteorigin_panels_cache', array(
|
84 |
return $this->cache_render;
|
85 |
}
|
86 |
|
87 |
+
/**
|
88 |
+
* @param $type
|
89 |
+
* @param $content
|
90 |
+
* @param $post_id
|
91 |
+
* @throws Exception
|
92 |
+
*/
|
93 |
public function add( $type, $content, $post_id ){
|
94 |
if( ! $this->is_cache_render() ) {
|
95 |
throw new Exception( 'A cache render must be started before adding HTML' );
|
97 |
$this->cache[ $type ][ $post_id ] .= trim( $content ) . ' ';
|
98 |
}
|
99 |
|
100 |
+
/**
|
101 |
+
* Get a value from the cache renderer
|
102 |
+
*
|
103 |
+
* @param $type html or css
|
104 |
+
* @param $post_id
|
105 |
+
* @return mixed
|
106 |
+
*/
|
107 |
public function get( $type, $post_id ){
|
108 |
if( ! empty( $this->cache[ $type ][ $post_id ] ) ) {
|
109 |
return $this->cache[ $type ][ $post_id ];
|
116 |
! empty( $cache_meta[ $type ] ) &&
|
117 |
$cache_meta[ 'version' ] == SITEORIGIN_PANELS_VERSION
|
118 |
) {
|
119 |
+
// This is a cache hit, so return what we need
|
120 |
return $cache_meta[ $type ];
|
121 |
}
|
122 |
|
140 |
}
|
141 |
}
|
142 |
|
143 |
+
/**
|
144 |
+
* Refresh the stored cache for a given post
|
145 |
+
*
|
146 |
+
* @param $post_id
|
147 |
+
* @param bool $save
|
148 |
+
* @return array
|
149 |
+
*/
|
150 |
private function refresh_cache( $post_id, $save = true ) {
|
151 |
$this->start_cache_render( $post_id );
|
152 |
|
inc/revisions.php
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
class SiteOrigin_Panels_Revisions {
|
9 |
|
10 |
function __construct() {
|
|
|
11 |
add_action( 'wp_restore_post_revision', array( $this, 'revisions_restore' ), 10, 2 );
|
12 |
|
13 |
add_filter( '_wp_post_revision_fields', array( $this, 'revisions_fields' ) );
|
@@ -22,6 +23,25 @@ class SiteOrigin_Panels_Revisions {
|
|
22 |
return empty( $single ) ? $single = new self() : $single;
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
/**
|
26 |
* Restore a revision.
|
27 |
*
|
8 |
class SiteOrigin_Panels_Revisions {
|
9 |
|
10 |
function __construct() {
|
11 |
+
add_action( 'save_post', array( $this, 'save_post' ), 11, 2 );
|
12 |
add_action( 'wp_restore_post_revision', array( $this, 'revisions_restore' ), 10, 2 );
|
13 |
|
14 |
add_filter( '_wp_post_revision_fields', array( $this, 'revisions_fields' ) );
|
23 |
return empty( $single ) ? $single = new self() : $single;
|
24 |
}
|
25 |
|
26 |
+
/**
|
27 |
+
* Store the Page Builder meta in the revision.
|
28 |
+
*
|
29 |
+
* @param $post_id
|
30 |
+
* @param $post
|
31 |
+
*/
|
32 |
+
function save_post( $post_id, $post ) {
|
33 |
+
if( is_preview() ) return;
|
34 |
+
|
35 |
+
$parent_id = wp_is_post_revision( $post_id );
|
36 |
+
if ( $parent_id ) {
|
37 |
+
// If the panels data meta exists, copy it into the revision.
|
38 |
+
$panels_data = get_post_meta( $parent_id, 'panels_data', true );
|
39 |
+
if ( ! empty( $panels_data ) ) {
|
40 |
+
add_metadata( 'post', $post_id, 'panels_data', $panels_data );
|
41 |
+
}
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
/**
|
46 |
* Restore a revision.
|
47 |
*
|
js/{siteorigin-panels-2512.js → siteorigin-panels-2513.js}
RENAMED
File without changes
|
js/{siteorigin-panels-2512.min.js → siteorigin-panels-2513.min.js}
RENAMED
File without changes
|
js/{styling-2512.js → styling-2513.js}
RENAMED
File without changes
|
js/{styling-2512.min.js → styling-2513.min.js}
RENAMED
File without changes
|
lang/siteorigin-panels.pot
CHANGED
@@ -465,7 +465,7 @@ msgstr ""
|
|
465 |
msgid "Custom Home Page Builder"
|
466 |
msgstr ""
|
467 |
|
468 |
-
#: tmp/inc/revisions.php:
|
469 |
msgid "Page Builder Content"
|
470 |
msgstr ""
|
471 |
|
@@ -1133,11 +1133,11 @@ msgstr ""
|
|
1133 |
msgid "Read More"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
-
#: tmp/siteorigin-panels.php:
|
1137 |
msgid "Edit Home Page"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: tmp/siteorigin-panels.php:
|
1141 |
msgid "Live Editor"
|
1142 |
msgstr ""
|
1143 |
|
465 |
msgid "Custom Home Page Builder"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: tmp/inc/revisions.php:79
|
469 |
msgid "Page Builder Content"
|
470 |
msgstr ""
|
471 |
|
1133 |
msgid "Read More"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: tmp/siteorigin-panels.php:432
|
1137 |
msgid "Edit Home Page"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: tmp/siteorigin-panels.php:452, tmp/tpl/js-templates.php:34, tmp/tpl/js-templates.php:36
|
1141 |
msgid "Live Editor"
|
1142 |
msgstr ""
|
1143 |
|
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.4
|
4 |
Tested up to: 4.8.1
|
5 |
-
Stable tag: 2.5.
|
6 |
-
Build time: 2017-09-
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
Donate link: https://siteorigin.com/downloads/contribution/
|
@@ -96,7 +96,12 @@ We've tried to ensure that Page Builder is compatible with most plugin widgets.
|
|
96 |
|
97 |
== Changelog ==
|
98 |
|
99 |
-
= 2.5.
|
|
|
|
|
|
|
|
|
|
|
100 |
* Learn: fixed broken image.
|
101 |
* Prevent JS error when PB active alongside Elementor.
|
102 |
* Disabling DFW mode no longer hides PB.
|
2 |
Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
|
3 |
Requires at least: 4.4
|
4 |
Tested up to: 4.8.1
|
5 |
+
Stable tag: 2.5.13
|
6 |
+
Build time: 2017-09-29T20:40:18+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.5.13 - 29 September 2017 =
|
100 |
+
* Always enqueue parallax when in cache mode.
|
101 |
+
* Skip saving post meta for revisions in previews.
|
102 |
+
* Cast post types as string when adding meta boxes.
|
103 |
+
|
104 |
+
= 2.5.12 - 14 September 2017 =
|
105 |
* Learn: fixed broken image.
|
106 |
* Prevent JS error when PB active alongside Elementor.
|
107 |
* Disabling DFW mode no longer hides PB.
|
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.5.
|
7 |
Author: SiteOrigin
|
8 |
Author URI: https://siteorigin.com
|
9 |
License: GPL3
|
@@ -11,11 +11,11 @@ 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.5.
|
15 |
if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
|
16 |
define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
|
17 |
}
|
18 |
-
define( 'SITEORIGIN_PANELS_VERSION_SUFFIX', '-
|
19 |
|
20 |
require_once plugin_dir_path( __FILE__ ) . 'inc/functions.php';
|
21 |
|
@@ -383,9 +383,13 @@ class SiteOrigin_Panels {
|
|
383 |
}
|
384 |
}
|
385 |
|
|
|
|
|
|
|
386 |
public function cached_post_enqueue(){
|
387 |
wp_enqueue_style( 'siteorigin-panels-front' );
|
388 |
wp_enqueue_script( 'siteorigin-panels-front-styles' );
|
|
|
389 |
}
|
390 |
|
391 |
/**
|
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.5.13
|
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.5.13' );
|
15 |
if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
|
16 |
define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
|
17 |
}
|
18 |
+
define( 'SITEORIGIN_PANELS_VERSION_SUFFIX', '-2513' );
|
19 |
|
20 |
require_once plugin_dir_path( __FILE__ ) . 'inc/functions.php';
|
21 |
|
383 |
}
|
384 |
}
|
385 |
|
386 |
+
/**
|
387 |
+
* Enqueue scripts and styles when using cache.
|
388 |
+
*/
|
389 |
public function cached_post_enqueue(){
|
390 |
wp_enqueue_style( 'siteorigin-panels-front' );
|
391 |
wp_enqueue_script( 'siteorigin-panels-front-styles' );
|
392 |
+
wp_enqueue_script( 'siteorigin-parallax' );
|
393 |
}
|
394 |
|
395 |
/**
|