Brizy – Page Builder - Version 1.0.66

Version Description

  • 2019-03-28 =
  • Fixed: Form integrations
  • Fixed: Back to WordPress button in classic editor
  • Fixed: Project dependencies
Download this release

Release Info

Developer themefusecom
Plugin Icon 128x128 Brizy – Page Builder
Version 1.0.66
Comparing to
See all releases

Code changes from version 1.0.65 to 1.0.66

README.md CHANGED
@@ -1,9 +1,9 @@
1
  # Brizy - Page Builder
2
  Contributors: themefuse<br>
3
  Requires at least: 4.5<br>
4
- Tested up to: 4.9<br>
5
  Requires PHP: 5.4<br>
6
- Stable tag: 1.0.65<br>
7
  License: GPLv3<br>
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -118,22 +118,10 @@ $bodyHtml = apply_filters( 'brizy_content', $html->get_body(), Brizy_Editor_Proj
118
 
119
  ## Changelog
120
 
121
- ### 1.0.65 - 2019-03-21 ###
122
- * New: Block Adder UI
123
- * New: Map and Soundcloud border options
124
- * New: Added spacing for cloneable elements (Button, Icon, etc.) on mobile and tablet
125
- * Improved: Custom CSS option
126
- * Improved: Link option tabs order
127
- * Improved: Network optimizations for block screenshots
128
- * Improved: Base64 encode compiled HTML
129
- * Fixed: Stop playing videos inside closed popups
130
- * Fixed: Video cover position
131
- * Fixed: Animations in Safari
132
- * Fixed: Images that are added via Embed option CSS
133
- * Fixed: Screenshot API refactoring
134
- * Fixed: Form serialization
135
- * Fixed: Compatibility SG optimizer
136
- * Fixed: Compile post flag refactoring
137
 
138
  ### 1.0.65 - 2019-03-21 ###
139
  * New: Block Adder UI
1
  # Brizy - Page Builder
2
  Contributors: themefuse<br>
3
  Requires at least: 4.5<br>
4
+ Tested up to: 5.1<br>
5
  Requires PHP: 5.4<br>
6
+ Stable tag: 1.0.66<br>
7
  License: GPLv3<br>
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
118
 
119
  ## Changelog
120
 
121
+ ### 1.0.66 - 2019-03-28 ###
122
+ * Fixed: Form integrations
123
+ * Fixed: Back to WordPress button in classic editor
124
+ * Fixed: Project dependencies
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
  ### 1.0.65 - 2019-03-21 ###
127
  * New: Block Adder UI
admin/views/button.php CHANGED
@@ -12,13 +12,13 @@ $label = $is_using_brizy ? esc_html__( 'Back to WordPress Editor', 'brizy' )
12
  $className = $is_using_brizy ? 'brizy-button--default' : 'brizy-button--primary';
13
  ?>
14
  <div class="brizy-buttons">
15
- <a class="brizy-button <?php echo $className; ?> enable-brizy-editor" type="button"
16
  href="<?php echo esc_url( set_url_scheme(admin_url( 'admin-post.php?action=_brizy_admin_editor_' . $state . '&post=' . $post->ID )) ); ?>">
17
  <?php
18
  if ( $is_using_brizy ) {
19
  ?>
20
  <img src="<?php echo plugins_url( '../static/img/arrow.png', __FILE__ ) ?>"
21
- class="brizy-button--arrow"/> <?php echo _e( $label, 'brizy' ); ?>
22
  <?php
23
  } else {
24
  ?>
@@ -41,9 +41,10 @@ if ( $is_using_brizy ) {
41
  </style>
42
 
43
  <div class="brizy-editor">
44
- <a class="preview brizy-button brizy-button--primary" type="button"
45
- href="<?php echo $url; ?>"><?php _e( 'Continue to edit with', 'brizy' ); ?>&nbsp;
46
- <img src="<?php echo plugins_url( '../static/img/brizy.png', __FILE__ ); ?>" srcset="<?php echo plugins_url( '../static/img/brizy.png', __FILE__ ); ?> 1x, <?php echo plugins_url( '../static/img/brizy-2x.png', __FILE__ ); ?> 2x" class="brizy-logo"/></a>
 
47
  </div>
48
  <?php
49
  }
12
  $className = $is_using_brizy ? 'brizy-button--default' : 'brizy-button--primary';
13
  ?>
14
  <div class="brizy-buttons">
15
+ <a class="brizy-button <?php echo $className; ?> enable-brizy-editor brizy-button--primary" type="button"
16
  href="<?php echo esc_url( set_url_scheme(admin_url( 'admin-post.php?action=_brizy_admin_editor_' . $state . '&post=' . $post->ID )) ); ?>">
17
  <?php
18
  if ( $is_using_brizy ) {
19
  ?>
20
  <img src="<?php echo plugins_url( '../static/img/arrow.png', __FILE__ ) ?>"
21
+ class="brizy-button--arrow"/> <?php echo __( $label, 'brizy' ); ?>
22
  <?php
23
  } else {
24
  ?>
41
  </style>
42
 
43
  <div class="brizy-editor">
44
+ <a class="preview brizy-button brizy-button--primary" type="button" href="<?php echo $url; ?>">
45
+ <?php _e( 'Continue to edit with', 'brizy' ); ?>&nbsp;
46
+ <img src="<?php echo plugins_url( '../static/img/brizy.png', __FILE__ ); ?>" srcset="<?php echo plugins_url( '../static/img/brizy.png', __FILE__ ); ?> 1x, <?php echo plugins_url( '../static/img/brizy-2x.png', __FILE__ ); ?> 2x" class="brizy-logo"/>
47
+ </a>
48
  </div>
49
  <?php
50
  }
brizy.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin URI: https://brizy.io/
6
  * Author: Brizy.io
7
  * Author URI: https://brizy.io/
8
- * Version: 1.0.65
9
  * Text Domain: brizy
10
  * License: GPLv3
11
  * Domain Path: /languages
@@ -19,7 +19,7 @@ if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && stripos( $_SERVER['HTTP_X_FO
19
 
20
  define( 'BRIZY_DEVELOPMENT', false );
21
  define( 'BRIZY_LOG', false );
22
- define( 'BRIZY_VERSION', '1.0.65' );
23
  define( 'BRIZY_EDITOR_VERSION', '1.0.90' );
24
  define( 'BRIZY_FILE', __FILE__ );
25
  define( 'BRIZY_PLUGIN_BASE', plugin_basename( BRIZY_FILE ) );
5
  * Plugin URI: https://brizy.io/
6
  * Author: Brizy.io
7
  * Author URI: https://brizy.io/
8
+ * Version: 1.0.66
9
  * Text Domain: brizy
10
  * License: GPLv3
11
  * Domain Path: /languages
19
 
20
  define( 'BRIZY_DEVELOPMENT', false );
21
  define( 'BRIZY_LOG', false );
22
+ define( 'BRIZY_VERSION', '1.0.66' );
23
  define( 'BRIZY_EDITOR_VERSION', '1.0.90' );
24
  define( 'BRIZY_FILE', __FILE__ );
25
  define( 'BRIZY_PLUGIN_BASE', plugin_basename( BRIZY_FILE ) );
editor.php CHANGED
@@ -78,7 +78,6 @@ class Brizy_Editor {
78
  try {
79
  // do not delete this line
80
  $user = Brizy_Editor_User::get();
81
- $project = Brizy_Editor_Project::get();
82
 
83
  if ( $pid ) {
84
  $post = Brizy_Editor_Post::get( $pid );
@@ -90,7 +89,7 @@ class Brizy_Editor {
90
  } catch ( Exception $e ) {
91
  }
92
 
93
- $this->loadEditorApi( $project, $post, $user );
94
  $this->loadEditorAdminSettings();
95
 
96
  function brizy_add_dashboard_widgets() {
@@ -104,7 +103,7 @@ class Brizy_Editor {
104
  if ( $post && $post->uses_editor() ) {
105
 
106
  if ( is_user_logged_in() ) {
107
- $this->handleBackEndEditor( $user, $project, $post );
108
  }
109
  }
110
 
@@ -167,13 +166,11 @@ class Brizy_Editor {
167
  }
168
 
169
  /**
170
- * @param Brizy_Editor_User $user
171
- * @param Brizy_Editor_Project $project
172
  * @param Brizy_Editor_Post $post
173
  */
174
- public function handleFrontEndEditor( $user, $project, $post ) {
175
  try {
176
- $main = new Brizy_Public_Main( $project, $post );
177
  $main->initialize_front_end();
178
  } catch ( Exception $e ) {
179
  Brizy_Logger::instance()->exception( $e );
@@ -181,14 +178,12 @@ class Brizy_Editor {
181
  }
182
 
183
  /**
184
- * @param Brizy_Editor_User $user
185
- * @param Brizy_Editor_Project $project
186
  * @param Brizy_Editor_Post $post
187
  */
188
- public function handleBackEndEditor( $user, $project, $post ) {
189
 
190
  try {
191
- $main = new Brizy_Public_Main( $project, $post );
192
  $main->initialize_wordpress_editor();
193
  } catch ( Exception $e ) {
194
  Brizy_Logger::instance()->exception( $e );
@@ -200,14 +195,14 @@ class Brizy_Editor {
200
  * @param $post
201
  * @param $user
202
  */
203
- private function loadEditorApi( $project, $post, $user ) {
204
  try {
205
- new Brizy_Editor_API( $project, $post );
206
- new Brizy_Editor_BlockScreenshotApi( $project, $post );
207
- new Brizy_Editor_Forms_Api( $project, $post );
208
 
209
  // for other apis
210
- do_action( 'brizy_register_api_methods', $user, $project, $post );
211
  } catch ( Exception $e ) {
212
  Brizy_Logger::instance()->exception( $e );
213
  }
@@ -236,8 +231,6 @@ class Brizy_Editor {
236
  // do not delete this line
237
  $user = Brizy_Editor_User::get();
238
 
239
- $project = Brizy_Editor_Project::get();
240
-
241
  if ( $pid ) {
242
  $post = Brizy_Editor_Post::get( $pid );
243
  }
@@ -246,7 +239,7 @@ class Brizy_Editor {
246
  }
247
 
248
  if ( $post && $post->uses_editor() ) {
249
- $this->handleFrontEndEditor( $user, $project, $post );
250
  }
251
  }
252
 
@@ -259,14 +252,13 @@ class Brizy_Editor {
259
 
260
  private function initializeAssetLoaders() {
261
  try {
262
- $project = Brizy_Editor_Project::get();
263
- $url_builder = new Brizy_Editor_UrlBuilder( $project );
264
 
265
  $config = null;
266
  $proxy = new Brizy_Public_AssetProxy( $url_builder, $config );
267
  $crop_roxy = new Brizy_Public_CropProxy( $url_builder, $config );
268
- $screenshot_roxy = new Brizy_Public_BlockScreenshotProxy( new Brizy_Editor_UrlBuilder( $project ), $config );
269
- $screenshot_roxy = new Brizy_Public_FileProxy( new Brizy_Editor_UrlBuilder( $project ), $config );
270
  } catch ( Exception $e ) {
271
  Brizy_Logger::instance()->exception( $e );
272
  }
78
  try {
79
  // do not delete this line
80
  $user = Brizy_Editor_User::get();
 
81
 
82
  if ( $pid ) {
83
  $post = Brizy_Editor_Post::get( $pid );
89
  } catch ( Exception $e ) {
90
  }
91
 
92
+ $this->loadEditorApi( $post, $user );
93
  $this->loadEditorAdminSettings();
94
 
95
  function brizy_add_dashboard_widgets() {
103
  if ( $post && $post->uses_editor() ) {
104
 
105
  if ( is_user_logged_in() ) {
106
+ $this->handleBackEndEditor( $post );
107
  }
108
  }
109
 
166
  }
167
 
168
  /**
 
 
169
  * @param Brizy_Editor_Post $post
170
  */
171
+ public function handleFrontEndEditor( $post ) {
172
  try {
173
+ $main = new Brizy_Public_Main( $post );
174
  $main->initialize_front_end();
175
  } catch ( Exception $e ) {
176
  Brizy_Logger::instance()->exception( $e );
178
  }
179
 
180
  /**
 
 
181
  * @param Brizy_Editor_Post $post
182
  */
183
+ public function handleBackEndEditor( $post ) {
184
 
185
  try {
186
+ $main = new Brizy_Public_Main( $post );
187
  $main->initialize_wordpress_editor();
188
  } catch ( Exception $e ) {
189
  Brizy_Logger::instance()->exception( $e );
195
  * @param $post
196
  * @param $user
197
  */
198
+ private function loadEditorApi( $post, $user ) {
199
  try {
200
+ new Brizy_Editor_API( $post );
201
+ new Brizy_Editor_BlockScreenshotApi( $post );
202
+ new Brizy_Editor_Forms_Api( $post );
203
 
204
  // for other apis
205
+ do_action( 'brizy_register_api_methods', $user, $post );
206
  } catch ( Exception $e ) {
207
  Brizy_Logger::instance()->exception( $e );
208
  }
231
  // do not delete this line
232
  $user = Brizy_Editor_User::get();
233
 
 
 
234
  if ( $pid ) {
235
  $post = Brizy_Editor_Post::get( $pid );
236
  }
239
  }
240
 
241
  if ( $post && $post->uses_editor() ) {
242
+ $this->handleFrontEndEditor( $post );
243
  }
244
  }
245
 
252
 
253
  private function initializeAssetLoaders() {
254
  try {
255
+ $url_builder = new Brizy_Editor_UrlBuilder( null );
 
256
 
257
  $config = null;
258
  $proxy = new Brizy_Public_AssetProxy( $url_builder, $config );
259
  $crop_roxy = new Brizy_Public_CropProxy( $url_builder, $config );
260
+ $screenshot_roxy = new Brizy_Public_BlockScreenshotProxy( new Brizy_Editor_UrlBuilder( null ), $config );
261
+ $screenshot_roxy = new Brizy_Public_FileProxy( new Brizy_Editor_UrlBuilder( null ), $config );
262
  } catch ( Exception $e ) {
263
  Brizy_Logger::instance()->exception( $e );
264
  }
editor/api.php CHANGED
@@ -34,23 +34,11 @@ class Brizy_Editor_API {
34
  const AJAX_SET_FEATURED_IMAGE_FOCAL_POINT = 'brizy_set_featured_image_focal_point';
35
  const AJAX_REMOVE_FEATURED_IMAGE = 'brizy_remove_featured_image';
36
 
37
- /**
38
- * @var Brizy_Editor_Project
39
- */
40
- private $project;
41
-
42
  /**
43
  * @var Brizy_Editor_Post
44
  */
45
  private $post;
46
 
47
- /**
48
- * @return Brizy_Editor_Project
49
- */
50
- public function get_project() {
51
- return $this->project;
52
- }
53
-
54
  /**
55
  * @return Brizy_Editor_Post
56
  */
@@ -64,9 +52,8 @@ class Brizy_Editor_API {
64
  * @param Brizy_Editor_Project $project
65
  * @param Brizy_Editor_Post $post
66
  */
67
- public function __construct( $project, $post ) {
68
 
69
- $this->project = $project;
70
  $this->post = $post;
71
 
72
  $this->initialize();
@@ -337,9 +324,9 @@ class Brizy_Editor_API {
337
  throw new Exception( "The received global data is invalid" );
338
  }
339
 
340
-
341
  //$post_id = (int) $this->param( 'post' );
342
- $this->project->setGlobalsAsJson( $data );
343
 
344
  // mark all brizy post to be compiled on next view
345
  Brizy_Editor_Post::clear_compiled_cache();
@@ -610,10 +597,10 @@ class Brizy_Editor_API {
610
  */
611
  public function create_post_globals() {
612
  $wp_post = $this->post->get_wp_post();
613
-
614
  $globals = array(
615
- 'id' => $this->project->getId(),
616
- 'gb' => $this->project->getGlobals(),
617
  'name' => $wp_post->post_name,
618
  'createdAt' => $wp_post->post_date,
619
  'updatedAt' => $wp_post->post_date,
34
  const AJAX_SET_FEATURED_IMAGE_FOCAL_POINT = 'brizy_set_featured_image_focal_point';
35
  const AJAX_REMOVE_FEATURED_IMAGE = 'brizy_remove_featured_image';
36
 
 
 
 
 
 
37
  /**
38
  * @var Brizy_Editor_Post
39
  */
40
  private $post;
41
 
 
 
 
 
 
 
 
42
  /**
43
  * @return Brizy_Editor_Post
44
  */
52
  * @param Brizy_Editor_Project $project
53
  * @param Brizy_Editor_Post $post
54
  */
55
+ public function __construct( $post ) {
56
 
 
57
  $this->post = $post;
58
 
59
  $this->initialize();
324
  throw new Exception( "The received global data is invalid" );
325
  }
326
 
327
+ $project = Brizy_Editor_Project::get();
328
  //$post_id = (int) $this->param( 'post' );
329
+ $project->setGlobalsAsJson( $data );
330
 
331
  // mark all brizy post to be compiled on next view
332
  Brizy_Editor_Post::clear_compiled_cache();
597
  */
598
  public function create_post_globals() {
599
  $wp_post = $this->post->get_wp_post();
600
+ $project = Brizy_Editor_Project::get();
601
  $globals = array(
602
+ 'id' => $project->getId(),
603
+ 'gb' => $project->getGlobals(),
604
  'name' => $wp_post->post_name,
605
  'createdAt' => $wp_post->post_date,
606
  'updatedAt' => $wp_post->post_date,
editor/block-screenshot-api.php CHANGED
@@ -31,16 +31,14 @@ class Brizy_Editor_BlockScreenshotApi {
31
  private $blockTypes;
32
 
33
  /**
34
- * Brizy_Editor_BlockScreenshot constructor.
35
  *
36
- * @param $project
37
  * @param $post
 
 
38
  */
39
- public function __construct( $project, $post ) {
40
-
41
- $this->project = $project;
42
  $this->post = $post;
43
- $this->urlBuilder = new Brizy_Editor_UrlBuilder( $project, $post ? $post->get_parent_id() : null );
44
  $this->blockTypes = array( self::BLOCK_TYPE_NORMAL, self::BLOCK_TYPE_GLOBAL, self::BLOCK_TYPE_SAVED );
45
  $this->initialize();
46
  }
@@ -114,13 +112,15 @@ class Brizy_Editor_BlockScreenshotApi {
114
  */
115
  private function saveScreenshot( $type, $blockFileName, $content ) {
116
  try {
 
 
117
  switch ( $type ) {
118
  case self::BLOCK_TYPE_NORMAL:
119
- return $this->storeThumbnail( $content, $this->urlBuilder->page_upload_path( 'blockThumbnails' . DIRECTORY_SEPARATOR . $blockFileName ) );
120
  case self::BLOCK_TYPE_GLOBAL:
121
- return $this->storeThumbnail( $content, $this->urlBuilder->brizy_upload_path( 'blockThumbnails' . DIRECTORY_SEPARATOR . 'global' . DIRECTORY_SEPARATOR . $blockFileName ) );
122
  case self::BLOCK_TYPE_SAVED:
123
- return $this->storeThumbnail( $content, $this->urlBuilder->brizy_upload_path( 'blockThumbnails' . DIRECTORY_SEPARATOR . 'saved' . DIRECTORY_SEPARATOR . $blockFileName ) );
124
  }
125
  } catch ( Exception $e ) {
126
  return false;
31
  private $blockTypes;
32
 
33
  /**
34
+ * Brizy_Editor_BlockScreenshotApi constructor.
35
  *
 
36
  * @param $post
37
+ *
38
+ * @throws Exception
39
  */
40
+ public function __construct( $post ) {
 
 
41
  $this->post = $post;
 
42
  $this->blockTypes = array( self::BLOCK_TYPE_NORMAL, self::BLOCK_TYPE_GLOBAL, self::BLOCK_TYPE_SAVED );
43
  $this->initialize();
44
  }
112
  */
113
  private function saveScreenshot( $type, $blockFileName, $content ) {
114
  try {
115
+ $urlBuilder = new Brizy_Editor_UrlBuilder( Brizy_Editor_Project::get(), $this->post ? $this->post->get_parent_id() : null );
116
+
117
  switch ( $type ) {
118
  case self::BLOCK_TYPE_NORMAL:
119
+ return $this->storeThumbnail( $content, $urlBuilder->page_upload_path( 'blockThumbnails' . DIRECTORY_SEPARATOR . $blockFileName ) );
120
  case self::BLOCK_TYPE_GLOBAL:
121
+ return $this->storeThumbnail( $content, $urlBuilder->brizy_upload_path( 'blockThumbnails' . DIRECTORY_SEPARATOR . 'global' . DIRECTORY_SEPARATOR . $blockFileName ) );
122
  case self::BLOCK_TYPE_SAVED:
123
+ return $this->storeThumbnail( $content, $urlBuilder->brizy_upload_path( 'blockThumbnails' . DIRECTORY_SEPARATOR . 'saved' . DIRECTORY_SEPARATOR . $blockFileName ) );
124
  }
125
  } catch ( Exception $e ) {
126
  return false;
editor/forms/api.php CHANGED
@@ -15,23 +15,11 @@ class Brizy_Editor_Forms_Api {
15
 
16
  const AJAX_AUTHENTICATION_CALLBACK = 'brizy_authentication_callback';
17
 
18
- /**
19
- * @var Brizy_Editor_Project
20
- */
21
- private $project;
22
-
23
  /**
24
  * @var Brizy_Editor_Post
25
  */
26
  private $post;
27
 
28
- /**
29
- * @return Brizy_Editor_Project
30
- */
31
- public function get_project() {
32
- return $this->project;
33
- }
34
-
35
  /**
36
  * @return Brizy_Editor_Post
37
  */
@@ -42,13 +30,11 @@ class Brizy_Editor_Forms_Api {
42
  /**
43
  * Brizy_Editor_API constructor.
44
  *
45
- * @param Brizy_Editor_Project $project
46
  * @param Brizy_Editor_Post $post
47
  */
48
- public function __construct( $project, $post ) {
49
 
50
- $this->project = $project;
51
- $this->post = $post;
52
 
53
  $this->initialize();
54
  }
15
 
16
  const AJAX_AUTHENTICATION_CALLBACK = 'brizy_authentication_callback';
17
 
 
 
 
 
 
18
  /**
19
  * @var Brizy_Editor_Post
20
  */
21
  private $post;
22
 
 
 
 
 
 
 
 
23
  /**
24
  * @return Brizy_Editor_Post
25
  */
30
  /**
31
  * Brizy_Editor_API constructor.
32
  *
 
33
  * @param Brizy_Editor_Post $post
34
  */
35
+ public function __construct( $post ) {
36
 
37
+ $this->post = $post;
 
38
 
39
  $this->initialize();
40
  }
editor/forms/form.php CHANGED
@@ -25,7 +25,7 @@ class Brizy_Editor_Forms_Form extends Brizy_Admin_Serializable {
25
  $get_object_vars['integrations'][] = $integration->convertToOptionValue();
26
  }
27
 
28
- return $get_object_vars;
29
  }
30
 
31
  public function jsonSerialize() {
25
  $get_object_vars['integrations'][] = $integration->convertToOptionValue();
26
  }
27
 
28
+ return serialize($get_object_vars);
29
  }
30
 
31
  public function jsonSerialize() {
editor/forms/service-integration.php CHANGED
@@ -135,12 +135,22 @@ class Brizy_Editor_Forms_ServiceIntegration extends Brizy_Editor_Forms_AbstractI
135
 
136
  if ( isset( $data['fields'] ) ) {
137
  foreach ( $data['fields'] as $field ) {
138
- $instance->addField( Brizy_Editor_Forms_Field::createFromSerializedData( $field ) );
 
 
 
 
 
 
139
  }
140
  }
141
  if ( isset( $data['lists'] ) ) {
142
- foreach ( $data['lists'] as $lists ) {
143
- $instance->addList( Brizy_Editor_Forms_Group::createFromSerializedData( $lists ) );
 
 
 
 
144
  }
145
  }
146
  if ( isset( $data['usedAccount'] ) ) {
@@ -161,6 +171,7 @@ class Brizy_Editor_Forms_ServiceIntegration extends Brizy_Editor_Forms_AbstractI
161
  if ( isset( $data['hasConfirmation'] ) ) {
162
  $instance->setHasConfirmation( $data['hasConfirmation'] );
163
  }
 
164
  return $instance;
165
  }
166
 
@@ -247,7 +258,7 @@ class Brizy_Editor_Forms_ServiceIntegration extends Brizy_Editor_Forms_AbstractI
247
  }
248
  }
249
 
250
- return array();
251
  }
252
 
253
  /**
135
 
136
  if ( isset( $data['fields'] ) ) {
137
  foreach ( $data['fields'] as $field ) {
138
+
139
+ if ( $field instanceof Brizy_Editor_Forms_Field ) {
140
+ $instance->addField( $field );
141
+ } else {
142
+ $instance->addField( Brizy_Editor_Forms_Field::createFromSerializedData( $field ) );
143
+ }
144
+
145
  }
146
  }
147
  if ( isset( $data['lists'] ) ) {
148
+ foreach ( $data['lists'] as $list ) {
149
+ if ( $list instanceof Brizy_Editor_Forms_Group ) {
150
+ $instance->addList( $list );
151
+ } else {
152
+ $instance->addList( Brizy_Editor_Forms_Group::createFromSerializedData( $list ) );
153
+ }
154
  }
155
  }
156
  if ( isset( $data['usedAccount'] ) ) {
171
  if ( isset( $data['hasConfirmation'] ) ) {
172
  $instance->setHasConfirmation( $data['hasConfirmation'] );
173
  }
174
+
175
  return $instance;
176
  }
177
 
258
  }
259
  }
260
 
261
+ return null;
262
  }
263
 
264
  /**
editor/url-builder.php CHANGED
@@ -31,10 +31,7 @@ class Brizy_Editor_UrlBuilder
31
  */
32
  public function __construct($project = null, $post_id = null)
33
  {
34
-
35
- $this->project = $project;
36
  $this->post_id = $post_id;
37
-
38
  $this->upload_dir = Brizy_Admin_UploadDir::getUploadDir(null, true);
39
  }
40
 
@@ -317,18 +314,19 @@ class Brizy_Editor_UrlBuilder
317
  return new Brizy_Admin_UrlIterator($urls);
318
  }
319
 
320
- /**
321
- * @param null $path
322
- * @param null $template_version
323
- * @param null $template_slug
324
- *
325
- * @return string
326
- */
 
327
  public function external_asset_url($path = null, $template_version = null, $template_slug = null)
328
  {
329
 
330
  if (is_null($template_slug)) {
331
- $template_slug = $this->project->getTemplateSlug();
332
  }
333
  if (is_null($template_version)) {
334
  $template_version = BRIZY_EDITOR_VERSION;
31
  */
32
  public function __construct($project = null, $post_id = null)
33
  {
 
 
34
  $this->post_id = $post_id;
 
35
  $this->upload_dir = Brizy_Admin_UploadDir::getUploadDir(null, true);
36
  }
37
 
314
  return new Brizy_Admin_UrlIterator($urls);
315
  }
316
 
317
+ /**
318
+ * @param null $path
319
+ * @param null $template_version
320
+ * @param null $template_slug
321
+ *
322
+ * @return Brizy_Admin_UrlIterator
323
+ * @throws Brizy_Editor_Exceptions_NotFound
324
+ */
325
  public function external_asset_url($path = null, $template_version = null, $template_slug = null)
326
  {
327
 
328
  if (is_null($template_slug)) {
329
+ $template_slug = Brizy_Editor_Project::get()->getTemplateSlug();
330
  }
331
  if (is_null($template_version)) {
332
  $template_version = BRIZY_EDITOR_VERSION;
public/main.php CHANGED
@@ -4,37 +4,20 @@
4
 
5
  class Brizy_Public_Main {
6
 
7
- /**
8
- * @var Brizy_Editor_Project
9
- */
10
- private $project;
11
-
12
  /**
13
  * @var Brizy_Editor_Post
14
  */
15
  private $post;
16
 
17
- /**
18
- * @var Twig_Template
19
- */
20
- private $twig_template;
21
-
22
- /**
23
- * @var Brizy_Editor_UrlBuilder
24
- */
25
- private $url_builder;
26
 
27
  /**
28
  * Brizy_Public_Main constructor.
29
  *
30
- * @param $project
31
  * @param $post
32
  */
33
- public function __construct( $project, $post ) {
34
 
35
- $this->project = $project;
36
  $this->post = $post;
37
- $this->url_builder = new Brizy_Editor_UrlBuilder( $project, $post->get_parent_id() );
38
 
39
  add_filter( 'brizy_content', array( $this, 'brizy_content' ), 10, 3 );
40
  }
@@ -396,7 +379,7 @@ class Brizy_Public_Main {
396
 
397
 
398
  private function getConfigObject() {
399
- $editor = Brizy_Editor_Editor_Editor::get( $this->project, $this->post );
400
  $config_json = json_encode( $editor->config() );
401
  $config_object = json_decode( $config_json );
402
 
4
 
5
  class Brizy_Public_Main {
6
 
 
 
 
 
 
7
  /**
8
  * @var Brizy_Editor_Post
9
  */
10
  private $post;
11
 
 
 
 
 
 
 
 
 
 
12
 
13
  /**
14
  * Brizy_Public_Main constructor.
15
  *
 
16
  * @param $post
17
  */
18
+ public function __construct( $post ) {
19
 
 
20
  $this->post = $post;
 
21
 
22
  add_filter( 'brizy_content', array( $this, 'brizy_content' ), 10, 3 );
23
  }
379
 
380
 
381
  private function getConfigObject() {
382
+ $editor = Brizy_Editor_Editor_Editor::get( Brizy_Editor_Project::get(), $this->post );
383
  $config_json = json_encode( $editor->config() );
384
  $config_object = json_decode( $config_json );
385
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: themefuse
3
  Tags: brizy, page builder, editor, visual editor, unyson, wysiwyg, landing page, drag-and-drop, design, website builder, landing page builder, front-end builder
4
  Requires at least: 4.5
5
- Tested up to: 4.9
6
  Requires PHP: 5.4
7
- Stable tag: 1.0.65
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -139,22 +139,10 @@ The progress you're making while building your page is always backed up in the c
139
 
140
  == Changelog ==
141
 
142
- = 1.0.65 - 2019-03-21 =
143
- * New: Block Adder UI
144
- * New: Map and Soundcloud border options
145
- * New: Added spacing for cloneable elements (Button, Icon, etc.) on mobile and tablet
146
- * Improved: Custom CSS option
147
- * Improved: Link option tabs order
148
- * Improved: Network optimizations for block screenshots
149
- * Improved: Base64 encode compiled HTML
150
- * Fixed: Stop playing videos inside closed popups
151
- * Fixed: Video cover position
152
- * Fixed: Animations in Safari
153
- * Fixed: Images that are added via Embed option CSS
154
- * Fixed: Screenshot API refactoring
155
- * Fixed: Form serialization
156
- * Fixed: Compatibility SG optimizer
157
- * Fixed: Compile post flag refactoring
158
 
159
  = 1.0.65 - 2019-03-21 =
160
  * New: Block Adder UI
2
  Contributors: themefuse
3
  Tags: brizy, page builder, editor, visual editor, unyson, wysiwyg, landing page, drag-and-drop, design, website builder, landing page builder, front-end builder
4
  Requires at least: 4.5
5
+ Tested up to: 5.1
6
  Requires PHP: 5.4
7
+ Stable tag: 1.0.66
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
139
 
140
  == Changelog ==
141
 
142
+ = 1.0.66 - 2019-03-28 =
143
+ * Fixed: Form integrations
144
+ * Fixed: Back to WordPress button in classic editor
145
+ * Fixed: Project dependencies
 
 
 
 
 
 
 
 
 
 
 
 
146
 
147
  = 1.0.65 - 2019-03-21 =
148
  * New: Block Adder UI
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit0548fa72879b30dfb595608227cb6d1a::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitc1e8ed823c318ad28c62e5771853b1dc::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit0548fa72879b30dfb595608227cb6d1a
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit0548fa72879b30dfb595608227cb6d1a
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit0548fa72879b30dfb595608227cb6d1a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit0548fa72879b30dfb595608227cb6d1a', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit0548fa72879b30dfb595608227cb6d1a::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitc1e8ed823c318ad28c62e5771853b1dc
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitc1e8ed823c318ad28c62e5771853b1dc', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitc1e8ed823c318ad28c62e5771853b1dc', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitc1e8ed823c318ad28c62e5771853b1dc::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit0548fa72879b30dfb595608227cb6d1a
8
  {
9
  public static $prefixesPsr0 = array (
10
  'T' =>
@@ -19,7 +19,7 @@ class ComposerStaticInit0548fa72879b30dfb595608227cb6d1a
19
  public static function getInitializer(ClassLoader $loader)
20
  {
21
  return \Closure::bind(function () use ($loader) {
22
- $loader->prefixesPsr0 = ComposerStaticInit0548fa72879b30dfb595608227cb6d1a::$prefixesPsr0;
23
 
24
  }, null, ClassLoader::class);
25
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitc1e8ed823c318ad28c62e5771853b1dc
8
  {
9
  public static $prefixesPsr0 = array (
10
  'T' =>
19
  public static function getInitializer(ClassLoader $loader)
20
  {
21
  return \Closure::bind(function () use ($loader) {
22
+ $loader->prefixesPsr0 = ComposerStaticInitc1e8ed823c318ad28c62e5771853b1dc::$prefixesPsr0;
23
 
24
  }, null, ClassLoader::class);
25
  }