Changeset 3238457
- Timestamp:
- 02/11/2025 09:46:07 AM (12 months ago)
- Location:
- brizy
- Files:
-
- 14 edited
- 1 copied
-
tags/2.6.10 (copied) (copied from brizy/trunk)
-
tags/2.6.10/README.md (modified) (2 diffs)
-
tags/2.6.10/brizy.php (modified) (2 diffs)
-
tags/2.6.10/editor/api.php (modified) (1 diff)
-
tags/2.6.10/editor/asset/static-file-trait.php (modified) (2 diffs)
-
tags/2.6.10/languages/brizy.pot (modified) (3 diffs)
-
tags/2.6.10/readme.txt (modified) (2 diffs)
-
tags/2.6.10/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/README.md (modified) (2 diffs)
-
trunk/brizy.php (modified) (2 diffs)
-
trunk/editor/api.php (modified) (1 diff)
-
trunk/editor/asset/static-file-trait.php (modified) (2 diffs)
-
trunk/languages/brizy.pot (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
brizy/tags/2.6.10/README.md
r3231744 r3238457 5 5 Tested up to: 6.7.1<br> 6 6 Requires PHP: 7.2.24<br> 7 Stable tag: 2.6. 9<br>7 Stable tag: 2.6.10<br> 8 8 License: GPLv3<br> 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 136 136 137 137 ## Changelog 138 139 ### 2.6.10 - 2025-02-11 140 * Fixed: SVG attachment creation 141 * Fixed: added a security fix on API endpoint 142 138 143 139 144 ### 2.6.9 - 2025-01-30 -
brizy/tags/2.6.10/brizy.php
r3231744 r3238457 6 6 * Author: Brizy.io 7 7 * Author URI: https://brizy.io/ 8 * Version: 2.6. 98 * Version: 2.6.10 9 9 * Text Domain: brizy 10 10 * License: GPLv3 … … 20 20 define( 'BRIZY_DEVELOPMENT', false ); 21 21 define( 'BRIZY_LOG', false ); 22 define( 'BRIZY_VERSION', '2.6. 9' );22 define( 'BRIZY_VERSION', '2.6.10' ); 23 23 define( 'BRIZY_MINIMUM_PRO_VERSION', '2.4.15' ); 24 24 define( 'BRIZY_MINIMUM_COMPILER_VERSION', '303-wp' ); -
brizy/tags/2.6.10/editor/api.php
r3222672 r3238457 988 988 $user->ID = (int) $user->ID; 989 989 990 return $user; 990 return [ 991 'ID' => $user->ID, 992 'display_name' => $user->display_name, 993 'user_nicename' => $user->user_nicename, 994 'user_email' => $user->user_email, 995 'user_registered' => $user->user_registered, 996 ]; 991 997 }, 992 998 $users -
brizy/tags/2.6.10/editor/asset/static-file-trait.php
r3223493 r3238457 62 62 $content = self::get_asset_content($asset_source); 63 63 64 $tempFile = Brizy_Editor_Asset_StaticFile Trait::createSideLoadFile(64 $tempFile = Brizy_Editor_Asset_StaticFile::createSideLoadFile( 65 65 $basename, 66 66 $content 67 67 ); 68 68 69 $filePath = Brizy_Editor_Asset_StaticFile Trait::createSideLoadMedia( $tempFile, $asset_path );69 $filePath = Brizy_Editor_Asset_StaticFile::createSideLoadMedia( $tempFile, $asset_path ); 70 70 71 71 if ( $filePath instanceof WP_Error ) { 72 throw new Exception( "Unable to store the thumbnail ");72 throw new Exception( "Unable to store the thumbnail: ".$filePath->get_error_message() ); 73 73 } 74 74 … … 172 172 } 173 173 174 public static function createSideLoadMedia($tempFileArray, $assetPath, $postId = null, $uid = null) 175 { 176 177 $overrides = array('test_form' => false); 178 $post = get_post($postId); 179 180 $time = date("Y/m"); 181 if ($post && substr($post->post_date, 0, 4) > 0) { 182 $time = $post->post_date; 183 } 184 185 if (wp_mkdir_p(dirname($assetPath)) === false) { 186 Brizy_Logger::instance()->critical('Unable to create folder', [$assetPath]); 187 throw new Exception('Unable to create folder for block images'); 188 } 189 190 $uploadData = wp_handle_sideload($tempFileArray, $overrides, $time); 191 192 if (isset($uploadData['error'])) { 193 return new WP_Error('upload_error', $uploadData['error']); 194 } 195 196 if(!@copy($uploadData['file'], $assetPath)) { 197 $error = error_get_last(); 198 return new WP_Error('upload_error', htmlentities( $error['message'] )); 199 } 200 201 unlink($uploadData['file']); 202 203 return $assetPath; 204 } 174 public static function createSideLoadMedia( $tempFileArray, $assetPath, $postId = null, $uid = null ) { 175 176 $overrides = array( 'test_form' => false ); 177 $post = get_post( $postId ); 178 $time = date( "Y/m" ); 179 if ( $post && substr( $post->post_date, 0, 4 ) > 0 ) { 180 $time = $post->post_date; 181 } 182 if ( wp_mkdir_p( dirname( $assetPath ) ) === false ) { 183 Brizy_Logger::instance()->critical( 'Unable to create folder', [ $assetPath ] ); 184 throw new Exception( 'Unable to create folder for block images' ); 185 } 186 $uploadData = wp_handle_sideload( $tempFileArray, $overrides, $time ); 187 if ( isset( $uploadData['error'] ) ) { 188 return new WP_Error( 'upload_error', $uploadData['error'] ); 189 } 190 191 if ( $uploadData['file'] == $assetPath ) { 192 return $assetPath; 193 } 194 195 if ( ! @copy( $uploadData['file'], $assetPath ) ) { 196 $error = error_get_last(); 197 198 return new WP_Error( 'upload_error', htmlentities( $error['message'] ) ); 199 } 200 unlink( $uploadData['file'] ); 201 202 return $assetPath; 203 } 205 204 206 205 public static function createSideLoadFile($basename, $content) -
brizy/tags/2.6.10/languages/brizy.pot
r3231744 r3238457 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Brizy 2.6. 9\n"5 "Project-Id-Version: Brizy 2.6.10\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/workspace\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-0 1-30T06:39:22+00:00\n"12 "POT-Creation-Date: 2025-02-11T09:44:43+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 869 869 msgstr "" 870 870 871 #: editor/asset/static-file-trait.php:21 3871 #: editor/asset/static-file-trait.php:212 872 872 msgid "Failed to write content" 873 873 msgstr "" -
brizy/tags/2.6.10/readme.txt
r3231744 r3238457 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.2.24 7 Stable tag: 2.6. 97 Stable tag: 2.6.10 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 133 133 134 134 == Changelog == 135 136 = 2.6.10 - 2025-02-11 = 137 * Fixed: SVG attachment creation 138 * Fixed: added a security fix on API endpoint 139 135 140 136 141 = 2.6.9 - 2025-01-30 = -
brizy/tags/2.6.10/vendor/composer/installed.php
r3231744 r3238457 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 07075fe8ace9dd8755abead036dd6cb5fbf645ed',6 'reference' => 'da971b3c72b4fefd0d3d0412e1d09f73f45ce34c', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 43 43 'pretty_version' => 'dev-master', 44 44 'version' => 'dev-master', 45 'reference' => ' 07075fe8ace9dd8755abead036dd6cb5fbf645ed',45 'reference' => 'da971b3c72b4fefd0d3d0412e1d09f73f45ce34c', 46 46 'type' => 'library', 47 47 'install_path' => __DIR__ . '/../../', -
brizy/trunk/README.md
r3231744 r3238457 5 5 Tested up to: 6.7.1<br> 6 6 Requires PHP: 7.2.24<br> 7 Stable tag: 2.6. 9<br>7 Stable tag: 2.6.10<br> 8 8 License: GPLv3<br> 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 136 136 137 137 ## Changelog 138 139 ### 2.6.10 - 2025-02-11 140 * Fixed: SVG attachment creation 141 * Fixed: added a security fix on API endpoint 142 138 143 139 144 ### 2.6.9 - 2025-01-30 -
brizy/trunk/brizy.php
r3231744 r3238457 6 6 * Author: Brizy.io 7 7 * Author URI: https://brizy.io/ 8 * Version: 2.6. 98 * Version: 2.6.10 9 9 * Text Domain: brizy 10 10 * License: GPLv3 … … 20 20 define( 'BRIZY_DEVELOPMENT', false ); 21 21 define( 'BRIZY_LOG', false ); 22 define( 'BRIZY_VERSION', '2.6. 9' );22 define( 'BRIZY_VERSION', '2.6.10' ); 23 23 define( 'BRIZY_MINIMUM_PRO_VERSION', '2.4.15' ); 24 24 define( 'BRIZY_MINIMUM_COMPILER_VERSION', '303-wp' ); -
brizy/trunk/editor/api.php
r3222672 r3238457 988 988 $user->ID = (int) $user->ID; 989 989 990 return $user; 990 return [ 991 'ID' => $user->ID, 992 'display_name' => $user->display_name, 993 'user_nicename' => $user->user_nicename, 994 'user_email' => $user->user_email, 995 'user_registered' => $user->user_registered, 996 ]; 991 997 }, 992 998 $users -
brizy/trunk/editor/asset/static-file-trait.php
r3223493 r3238457 62 62 $content = self::get_asset_content($asset_source); 63 63 64 $tempFile = Brizy_Editor_Asset_StaticFile Trait::createSideLoadFile(64 $tempFile = Brizy_Editor_Asset_StaticFile::createSideLoadFile( 65 65 $basename, 66 66 $content 67 67 ); 68 68 69 $filePath = Brizy_Editor_Asset_StaticFile Trait::createSideLoadMedia( $tempFile, $asset_path );69 $filePath = Brizy_Editor_Asset_StaticFile::createSideLoadMedia( $tempFile, $asset_path ); 70 70 71 71 if ( $filePath instanceof WP_Error ) { 72 throw new Exception( "Unable to store the thumbnail ");72 throw new Exception( "Unable to store the thumbnail: ".$filePath->get_error_message() ); 73 73 } 74 74 … … 172 172 } 173 173 174 public static function createSideLoadMedia($tempFileArray, $assetPath, $postId = null, $uid = null) 175 { 176 177 $overrides = array('test_form' => false); 178 $post = get_post($postId); 179 180 $time = date("Y/m"); 181 if ($post && substr($post->post_date, 0, 4) > 0) { 182 $time = $post->post_date; 183 } 184 185 if (wp_mkdir_p(dirname($assetPath)) === false) { 186 Brizy_Logger::instance()->critical('Unable to create folder', [$assetPath]); 187 throw new Exception('Unable to create folder for block images'); 188 } 189 190 $uploadData = wp_handle_sideload($tempFileArray, $overrides, $time); 191 192 if (isset($uploadData['error'])) { 193 return new WP_Error('upload_error', $uploadData['error']); 194 } 195 196 if(!@copy($uploadData['file'], $assetPath)) { 197 $error = error_get_last(); 198 return new WP_Error('upload_error', htmlentities( $error['message'] )); 199 } 200 201 unlink($uploadData['file']); 202 203 return $assetPath; 204 } 174 public static function createSideLoadMedia( $tempFileArray, $assetPath, $postId = null, $uid = null ) { 175 176 $overrides = array( 'test_form' => false ); 177 $post = get_post( $postId ); 178 $time = date( "Y/m" ); 179 if ( $post && substr( $post->post_date, 0, 4 ) > 0 ) { 180 $time = $post->post_date; 181 } 182 if ( wp_mkdir_p( dirname( $assetPath ) ) === false ) { 183 Brizy_Logger::instance()->critical( 'Unable to create folder', [ $assetPath ] ); 184 throw new Exception( 'Unable to create folder for block images' ); 185 } 186 $uploadData = wp_handle_sideload( $tempFileArray, $overrides, $time ); 187 if ( isset( $uploadData['error'] ) ) { 188 return new WP_Error( 'upload_error', $uploadData['error'] ); 189 } 190 191 if ( $uploadData['file'] == $assetPath ) { 192 return $assetPath; 193 } 194 195 if ( ! @copy( $uploadData['file'], $assetPath ) ) { 196 $error = error_get_last(); 197 198 return new WP_Error( 'upload_error', htmlentities( $error['message'] ) ); 199 } 200 unlink( $uploadData['file'] ); 201 202 return $assetPath; 203 } 205 204 206 205 public static function createSideLoadFile($basename, $content) -
brizy/trunk/languages/brizy.pot
r3231744 r3238457 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Brizy 2.6. 9\n"5 "Project-Id-Version: Brizy 2.6.10\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/workspace\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-0 1-30T06:39:22+00:00\n"12 "POT-Creation-Date: 2025-02-11T09:44:43+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 869 869 msgstr "" 870 870 871 #: editor/asset/static-file-trait.php:21 3871 #: editor/asset/static-file-trait.php:212 872 872 msgid "Failed to write content" 873 873 msgstr "" -
brizy/trunk/readme.txt
r3231744 r3238457 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.2.24 7 Stable tag: 2.6. 97 Stable tag: 2.6.10 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 133 133 134 134 == Changelog == 135 136 = 2.6.10 - 2025-02-11 = 137 * Fixed: SVG attachment creation 138 * Fixed: added a security fix on API endpoint 139 135 140 136 141 = 2.6.9 - 2025-01-30 = -
brizy/trunk/vendor/composer/installed.php
r3231744 r3238457 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 07075fe8ace9dd8755abead036dd6cb5fbf645ed',6 'reference' => 'da971b3c72b4fefd0d3d0412e1d09f73f45ce34c', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 43 43 'pretty_version' => 'dev-master', 44 44 'version' => 'dev-master', 45 'reference' => ' 07075fe8ace9dd8755abead036dd6cb5fbf645ed',45 'reference' => 'da971b3c72b4fefd0d3d0412e1d09f73f45ce34c', 46 46 'type' => 'library', 47 47 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.