Brizy – Page Builder - Version 1.0.76

Version Description

  • 2019-05-14 =
  • Fixed: Guafrette warning in Path class
Download this release

Release Info

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

Code changes from version 1.0.75 to 1.0.76

README.md CHANGED
@@ -3,7 +3,7 @@ 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.75<br>
7
  License: GPLv3<br>
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -118,15 +118,19 @@ $bodyHtml = apply_filters( 'brizy_content', $html->get_body(), Brizy_Editor_Proj
118
 
119
  ## Changelog
120
 
 
 
 
121
  ### 1.0.75 - 2019-05-10 ###
122
  * New: Integrated Shortpixel image optimizer
123
  * Improved: Lowered the max brizy revision count
124
- * Improved: Delete old auto save posts
125
  * Improved: Changed max brizy revision count value to 30
126
  * Fixed: Optimized delete auto saved posts code
127
- * Fixed Create global blocks
128
- * Fixed Create attachment post for block images
129
- * Fixed: AutoOptimeze plugin break our css
 
130
 
131
 
132
  ### 1.0.74 - 2019-04-23 ###
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.76<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.76 - 2019-05-14 ###
122
+ * Fixed: Guafrette warning in Path class
123
+
124
  ### 1.0.75 - 2019-05-10 ###
125
  * New: Integrated Shortpixel image optimizer
126
  * Improved: Lowered the max brizy revision count
127
+ * Improved: Delete old autosave posts
128
  * Improved: Changed max brizy revision count value to 30
129
  * Fixed: Optimized delete auto saved posts code
130
+ * Fixed: Removed random image names (works only for new image uploads)
131
+ * Fixed: Create global blocks
132
+ * Fixed: Create attachment post for block images
133
+ * Fixed: Autoptimeze plugin breaks our css
134
 
135
 
136
  ### 1.0.74 - 2019-04-23 ###
admin/guafrette/local-adapter.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ use Gaufrette\Adapter\Local as OriginalLocalAdapter;
3
+
4
+ class Brizy_Admin_Guafrette_LocalAdapter extends OriginalLocalAdapter{
5
+
6
+ private $create;
7
+ private $mode;
8
+
9
+ /**
10
+ * @param string $directory Directory where the filesystem is located
11
+ * @param bool $create Whether to create the directory if it does not
12
+ * exist (default FALSE)
13
+ * @param int $mode Mode for mkdir
14
+ *
15
+ * @throws RuntimeException if the specified directory does not exist and
16
+ * could not be created
17
+ */
18
+ public function __construct($directory, $create = false, $mode = 0777)
19
+ {
20
+ $this->directory = Brizy_Admin_Guafrette_Path::normalize($directory);
21
+
22
+ if (is_link($this->directory)) {
23
+ $this->directory = realpath($this->directory);
24
+ }
25
+
26
+ $this->create = $create;
27
+ $this->mode = $mode;
28
+ }
29
+
30
+ protected function normalizePath($path)
31
+ {
32
+ $path = Brizy_Admin_Guafrette_Path::normalize($path);
33
+
34
+ if (0 !== strpos($path, $this->directory)) {
35
+ throw new \OutOfBoundsException(sprintf('The path "%s" is out of the filesystem.', $path));
36
+ }
37
+
38
+ return $path;
39
+ }
40
+
41
+ }
admin/guafrette/path.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use Gaufrette\Util\Path as OriginalPath;
4
+ /**
5
+ * Path utils.
6
+ *
7
+ * @author Antoine Hérault <antoine.herault@gmail.com>
8
+ */
9
+ class Brizy_Admin_Guafrette_Path extends OriginalPath
10
+ {
11
+ /**
12
+ * Normalizes the given path.
13
+ *
14
+ * @param string $path
15
+ *
16
+ * @return string
17
+ */
18
+ public static function normalize($path)
19
+ {
20
+ $path = str_replace('\\', '/', $path);
21
+ $prefix = static::getAbsolutePrefix($path);
22
+ $path = substr($path, strlen($prefix));
23
+ $parts = array_filter(explode('/', $path), 'strlen');
24
+ $tokens = array();
25
+
26
+ foreach ($parts as $part) {
27
+ switch ($part) {
28
+ case '.':
29
+ continue 2;
30
+ case '..':
31
+ if (0 !== count($tokens)) {
32
+ array_pop($tokens);
33
+ continue 2;
34
+ } elseif (!empty($prefix)) {
35
+ continue 2;
36
+ }
37
+ default:
38
+ $tokens[] = $part;
39
+ }
40
+ }
41
+
42
+ return $prefix.implode('/', $tokens);
43
+ }
44
+
45
+
46
+ }
admin/optimize-images.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
 
3
  use Gaufrette\Filesystem;
4
- use Gaufrette\Adapter\Local as LocalAdapter;
5
 
6
  class Brizy_Admin_OptimizeImages {
7
 
@@ -95,7 +94,7 @@ class Brizy_Admin_OptimizeImages {
95
  $settings = Brizy_Editor_Project::get()->getImageOptimizerSettings();
96
  $urlBuilder = new Brizy_Editor_UrlBuilder( Brizy_Editor_Project::get() );
97
  $brizy_upload_path = $urlBuilder->brizy_upload_path();
98
- $adapter = new LocalAdapter( $brizy_upload_path );
99
  $filesystem = new Filesystem( $adapter );
100
 
101
  $brizy_ids = Brizy_Editor_Post::get_all_brizy_post_ids();
1
  <?php
2
 
3
  use Gaufrette\Filesystem;
 
4
 
5
  class Brizy_Admin_OptimizeImages {
6
 
94
  $settings = Brizy_Editor_Project::get()->getImageOptimizerSettings();
95
  $urlBuilder = new Brizy_Editor_UrlBuilder( Brizy_Editor_Project::get() );
96
  $brizy_upload_path = $urlBuilder->brizy_upload_path();
97
+ $adapter = new Brizy_Admin_Guafrette_LocalAdapter( $brizy_upload_path );
98
  $filesystem = new Filesystem( $adapter );
99
 
100
  $brizy_ids = Brizy_Editor_Post::get_all_brizy_post_ids();
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.75
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.75' );
23
  define( 'BRIZY_EDITOR_VERSION', '1.0.97' );
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.76
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.76' );
23
  define( 'BRIZY_EDITOR_VERSION', '1.0.97' );
24
  define( 'BRIZY_FILE', __FILE__ );
25
  define( 'BRIZY_PLUGIN_BASE', plugin_basename( BRIZY_FILE ) );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: brizy, page builder, editor, visual editor, unyson, wysiwyg, landing page,
4
  Requires at least: 4.5
5
  Tested up to: 5.1
6
  Requires PHP: 5.4
7
- Stable tag: 1.0.75
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -139,15 +139,19 @@ The progress you're making while building your page is always backed up in the c
139
 
140
  == Changelog ==
141
 
 
 
 
142
  = 1.0.75 - 2019-05-10 =
143
  * New: Integrated Shortpixel image optimizer
144
  * Improved: Lowered the max brizy revision count
145
- * Improved: Delete old auto save posts
146
  * Improved: Changed max brizy revision count value to 30
147
  * Fixed: Optimized delete auto saved posts code
148
- * Fixed Create global blocks
149
- * Fixed Create attachment post for block images
150
- * Fixed: AutoOptimeze plugin break our css
 
151
 
152
 
153
  = 1.0.74 - 2019-04-23 =
4
  Requires at least: 4.5
5
  Tested up to: 5.1
6
  Requires PHP: 5.4
7
+ Stable tag: 1.0.76
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
139
 
140
  == Changelog ==
141
 
142
+ = 1.0.76 - 2019-05-14 =
143
+ * Fixed: Guafrette warning in Path class
144
+
145
  = 1.0.75 - 2019-05-10 =
146
  * New: Integrated Shortpixel image optimizer
147
  * Improved: Lowered the max brizy revision count
148
+ * Improved: Delete old autosave posts
149
  * Improved: Changed max brizy revision count value to 30
150
  * Fixed: Optimized delete auto saved posts code
151
+ * Fixed: Removed random image names (works only for new image uploads)
152
+ * Fixed: Create global blocks
153
+ * Fixed: Create attachment post for block images
154
+ * Fixed: Autoptimeze plugin breaks our css
155
 
156
 
157
  = 1.0.74 - 2019-04-23 =
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit2b306b75d24978b6613fc6e096bcea84::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInite0d5bddad35549e099b8267fe04a0259::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit2b306b75d24978b6613fc6e096bcea84
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit2b306b75d24978b6613fc6e096bcea84
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit2b306b75d24978b6613fc6e096bcea84', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit2b306b75d24978b6613fc6e096bcea84', '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\ComposerStaticInit2b306b75d24978b6613fc6e096bcea84::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit2b306b75d24978b6613fc6e096bcea84
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit2b306b75d24978b6613fc6e096bcea84::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire2b306b75d24978b6613fc6e096bcea84($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire2b306b75d24978b6613fc6e096bcea84($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInite0d5bddad35549e099b8267fe04a0259
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInite0d5bddad35549e099b8267fe04a0259', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInite0d5bddad35549e099b8267fe04a0259', '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\ComposerStaticInite0d5bddad35549e099b8267fe04a0259::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInite0d5bddad35549e099b8267fe04a0259::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequiree0d5bddad35549e099b8267fe04a0259($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequiree0d5bddad35549e099b8267fe04a0259($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit2b306b75d24978b6613fc6e096bcea84
8
  {
9
  public static $files = array (
10
  '8ec4222c68e580a23520eef4abe4380f' => __DIR__ . '/..' . '/shortpixel/shortpixel-php/lib/ShortPixel.php',
@@ -45,9 +45,9 @@ class ComposerStaticInit2b306b75d24978b6613fc6e096bcea84
45
  public static function getInitializer(ClassLoader $loader)
46
  {
47
  return \Closure::bind(function () use ($loader) {
48
- $loader->prefixLengthsPsr4 = ComposerStaticInit2b306b75d24978b6613fc6e096bcea84::$prefixLengthsPsr4;
49
- $loader->prefixDirsPsr4 = ComposerStaticInit2b306b75d24978b6613fc6e096bcea84::$prefixDirsPsr4;
50
- $loader->prefixesPsr0 = ComposerStaticInit2b306b75d24978b6613fc6e096bcea84::$prefixesPsr0;
51
 
52
  }, null, ClassLoader::class);
53
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInite0d5bddad35549e099b8267fe04a0259
8
  {
9
  public static $files = array (
10
  '8ec4222c68e580a23520eef4abe4380f' => __DIR__ . '/..' . '/shortpixel/shortpixel-php/lib/ShortPixel.php',
45
  public static function getInitializer(ClassLoader $loader)
46
  {
47
  return \Closure::bind(function () use ($loader) {
48
+ $loader->prefixLengthsPsr4 = ComposerStaticInite0d5bddad35549e099b8267fe04a0259::$prefixLengthsPsr4;
49
+ $loader->prefixDirsPsr4 = ComposerStaticInite0d5bddad35549e099b8267fe04a0259::$prefixDirsPsr4;
50
+ $loader->prefixesPsr0 = ComposerStaticInite0d5bddad35549e099b8267fe04a0259::$prefixesPsr0;
51
 
52
  }, null, ClassLoader::class);
53
  }