Changeset 3072937
- Timestamp:
- 04/18/2024 09:36:08 AM (2 years ago)
- Location:
- blockx
- Files:
-
- 8 edited
- 15 copied
-
tags/1.10.2 (copied) (copied from blockx/trunk)
-
tags/1.10.2/Plugin.php (copied) (copied from blockx/trunk/Plugin.php) (2 diffs)
-
tags/1.10.2/README.txt (copied) (copied from blockx/trunk/README.txt) (2 diffs)
-
tags/1.10.2/assets/dist/gutenberg.asset.php (copied) (copied from blockx/trunk/assets/dist/gutenberg.asset.php)
-
tags/1.10.2/assets/dist/gutenberg.css (copied) (copied from blockx/trunk/assets/dist/gutenberg.css)
-
tags/1.10.2/assets/dist/gutenberg.js (copied) (copied from blockx/trunk/assets/dist/gutenberg.js)
-
tags/1.10.2/classes/BlockAssetsGenerator.php (modified) (8 diffs)
-
tags/1.10.2/classes/Blocks/Debug.php (copied) (copied from blockx/trunk/classes/Blocks/Debug.php)
-
tags/1.10.2/classes/Headless.php (copied) (copied from blockx/trunk/classes/Headless.php) (1 diff)
-
tags/1.10.2/classes/Model/LabelSuggestion.php (copied) (copied from blockx/trunk/classes/Model/LabelSuggestion.php)
-
tags/1.10.2/classes/Model/SimpleSuggestion.php (copied) (copied from blockx/trunk/classes/Model/SimpleSuggestion.php)
-
tags/1.10.2/classes/Model/UrlSuggestion.php (copied) (copied from blockx/trunk/classes/Model/UrlSuggestion.php)
-
tags/1.10.2/classes/Settings.php (modified) (1 diff)
-
tags/1.10.2/classes/Utils/PostUrlSuggestionProvider.php (copied) (copied from blockx/trunk/classes/Utils/PostUrlSuggestionProvider.php)
-
tags/1.10.2/classes/Widgets/AutoComplete.php (copied) (copied from blockx/trunk/classes/Widgets/AutoComplete.php)
-
tags/1.10.2/classes/Widgets/AutoSuggest.php (copied) (copied from blockx/trunk/classes/Widgets/AutoSuggest.php)
-
tags/1.10.2/vendor/composer/installed.php (copied) (copied from blockx/trunk/vendor/composer/installed.php) (2 diffs)
-
trunk/Plugin.php (modified) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/classes/BlockAssetsGenerator.php (modified) (8 diffs)
-
trunk/classes/Headless.php (modified) (1 diff)
-
trunk/classes/Settings.php (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blockx/tags/1.10.2/Plugin.php
r3032276 r3072937 5 5 * Plugin URI: https://github.com/palasthotel/blockX 6 6 * Description: Experimental blocks for palasthotel 7 * Version: 1.10. 07 * Version: 1.10.2 8 8 * Author: Palasthotel <rezeption@palasthotel.de> (in person: Edward Bock) 9 9 * Author URI: http://www.palasthotel.de 10 10 * Requires at least: 5.0 11 * Tested up to: 6. 4.311 * Tested up to: 6.5.2 12 12 * Requires PHP: 8.0 13 13 * Text Domain: blockx 14 14 * License: http://www.gnu.org/licenses/gpl-2.0.html GPLv2 15 * @copyright Copyright (c) 2024,Palasthotel15 * @copyright Palasthotel 16 16 * @package Palasthotel\WordPress\BlockX 17 17 * … … 21 21 22 22 require_once dirname( __FILE__ ) . "/vendor/autoload.php"; 23 24 if(!defined('BLOCKX_DISALLOW_BLOCK_JSON_GENERATION')){ 25 define('BLOCKX_DISALLOW_BLOCK_JSON_GENERATION', false); 26 } 23 27 24 28 class Plugin extends Components\Plugin { -
blockx/tags/1.10.2/README.txt
r3032276 r3072937 4 4 Tags: gutenberg, block, developer, utils 5 5 Requires at least: 5.0 6 Tested up to: 6. 4.36 Tested up to: 6.5.2 7 7 Requires PHP: 8.0 8 Stable tag: 1.10. 08 Stable tag: 1.10.2 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl … … 34 34 35 35 == Changelog == 36 37 = 1.10.2 = 38 * Bugfix: Add missing import in Headless.php 39 40 = 1.10.1 = 41 * Bugfix: Regeneration of block.json in some cases incorrectly disabled 36 42 37 43 = 1.10.0 = -
blockx/tags/1.10.2/classes/BlockAssetsGenerator.php
r2984558 r3072937 47 47 } 48 48 } catch (Exception $e){ 49 49 error_log($e->getMessage()); 50 50 } 51 51 } … … 62 62 return; 63 63 } 64 $currentContent = ""; 65 if(is_file($jsonFile)){ 66 $currentContent = file_get_contents($jsonFile); 67 } 64 68 $contents = file_get_contents( $this->plugin->path . "assets/block/block.json" ); 65 69 $json = json_decode( $contents ); … … 95 99 } 96 100 97 file_put_contents( $jsonFile, json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ) ); 101 $encoded = json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ); 102 if($currentContent != $encoded){ 103 file_put_contents( $jsonFile, $encoded); 104 } 98 105 } 99 106 } … … 106 113 return; 107 114 } 115 116 $currentContent = ""; 117 if(is_file($jsonFile)){ 118 $currentContent = file_get_contents($jsonFile); 119 } 120 108 121 $contents = file_get_contents( $this->plugin->path . "assets/container/block.json" ); 109 122 $json = json_decode( $contents ); … … 112 125 $json->style = $container->styles()->handles; 113 126 $json->editorStyle = $container->editorStyles()->handles; 114 file_put_contents( $jsonFile, json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ) ); 127 128 $encoded = json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ); 129 if($currentContent != $encoded){ 130 file_put_contents( $jsonFile, $encoded); 131 } 115 132 } 116 133 } … … 123 140 return; 124 141 } 142 143 $currentContent = ""; 144 if(is_file($jsonFile)){ 145 $currentContent = file_get_contents($jsonFile); 146 } 147 125 148 $contents = file_get_contents( $this->plugin->path . "assets/composedBlock/block.json" ); 126 149 $json = json_decode( $contents ); … … 129 152 $json->style = $composedBlock->styles()->handles; 130 153 $json->editorStyle = $composedBlock->editorStyles()->handles; 131 file_put_contents( $jsonFile, json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ) ); 154 155 $encoded = json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ); 156 if($currentContent != $encoded){ 157 file_put_contents( $jsonFile, $encoded); 158 } 132 159 } 133 160 } … … 148 175 return; 149 176 } 177 178 $currentContent = ""; 179 if(is_file($styleFile)){ 180 $currentContent = file_get_contents($styleFile); 181 } 182 150 183 ob_start(); 151 184 include $this->plugin->path . "/scripts/container-styles.php"; 152 185 $css = ob_get_contents(); 153 186 ob_end_clean(); 154 file_put_contents( $styleFile, $css ); 187 188 if($currentContent != $css){ 189 file_put_contents( $styleFile, $css ); 190 } 155 191 } 156 192 } -
blockx/tags/1.10.2/classes/Headless.php
r3032276 r3072937 3 3 namespace Palasthotel\WordPress\BlockX; 4 4 5 use Palasthotel\WordPress\BlockX\Blocks\_BlockType; 5 6 use Palasthotel\WordPress\BlockX\Blocks\PostEmbed; 6 7 use Palasthotel\WordPress\BlockX\Blocks\Posts; -
blockx/tags/1.10.2/classes/Settings.php
r2606165 r3072937 192 192 $path = $this->plugin->bag->paths->system; 193 193 $url = $this->plugin->bag->paths->url; 194 if ( defined( ' DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS) {195 $info = __( " File mods are disabled via DISALLOW_FILE_MODSconstant.", Plugin::DOMAIN );194 if ( defined( 'BLOCKX_DISALLOW_BLOCK_JSON_GENERATION' ) && BLOCKX_DISALLOW_BLOCK_JSON_GENERATION ) { 195 $info = __( "Blockx block.json generation is disabled via BLOCKX_DISALLOW_BLOCK_JSON_GENERATION constant.", Plugin::DOMAIN ); 196 196 echo '<input type="submit" disabled="disabled" class="button" value="Regenerate" title="' . $info . '" />'; 197 echo "<p class='description'>$info</p>"; 197 198 } else { 198 199 submit_button( "Regenerate", 'secondary', 'regenerate' ); -
blockx/tags/1.10.2/vendor/composer/installed.php
r3032276 r3072937 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 17b0be48c500a8db9cdaacf269bd746aa763a08b',6 'reference' => '9a5b4ae246bd288402c30e7fe6856692a1f246ab', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 17b0be48c500a8db9cdaacf269bd746aa763a08b',16 'reference' => '9a5b4ae246bd288402c30e7fe6856692a1f246ab', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
blockx/trunk/Plugin.php
r3032276 r3072937 5 5 * Plugin URI: https://github.com/palasthotel/blockX 6 6 * Description: Experimental blocks for palasthotel 7 * Version: 1.10. 07 * Version: 1.10.2 8 8 * Author: Palasthotel <rezeption@palasthotel.de> (in person: Edward Bock) 9 9 * Author URI: http://www.palasthotel.de 10 10 * Requires at least: 5.0 11 * Tested up to: 6. 4.311 * Tested up to: 6.5.2 12 12 * Requires PHP: 8.0 13 13 * Text Domain: blockx 14 14 * License: http://www.gnu.org/licenses/gpl-2.0.html GPLv2 15 * @copyright Copyright (c) 2024,Palasthotel15 * @copyright Palasthotel 16 16 * @package Palasthotel\WordPress\BlockX 17 17 * … … 21 21 22 22 require_once dirname( __FILE__ ) . "/vendor/autoload.php"; 23 24 if(!defined('BLOCKX_DISALLOW_BLOCK_JSON_GENERATION')){ 25 define('BLOCKX_DISALLOW_BLOCK_JSON_GENERATION', false); 26 } 23 27 24 28 class Plugin extends Components\Plugin { -
blockx/trunk/README.txt
r3032276 r3072937 4 4 Tags: gutenberg, block, developer, utils 5 5 Requires at least: 5.0 6 Tested up to: 6. 4.36 Tested up to: 6.5.2 7 7 Requires PHP: 8.0 8 Stable tag: 1.10. 08 Stable tag: 1.10.2 9 9 License: GPLv3 10 10 License URI: http://www.gnu.org/licenses/gpl … … 34 34 35 35 == Changelog == 36 37 = 1.10.2 = 38 * Bugfix: Add missing import in Headless.php 39 40 = 1.10.1 = 41 * Bugfix: Regeneration of block.json in some cases incorrectly disabled 36 42 37 43 = 1.10.0 = -
blockx/trunk/classes/BlockAssetsGenerator.php
r2984558 r3072937 47 47 } 48 48 } catch (Exception $e){ 49 49 error_log($e->getMessage()); 50 50 } 51 51 } … … 62 62 return; 63 63 } 64 $currentContent = ""; 65 if(is_file($jsonFile)){ 66 $currentContent = file_get_contents($jsonFile); 67 } 64 68 $contents = file_get_contents( $this->plugin->path . "assets/block/block.json" ); 65 69 $json = json_decode( $contents ); … … 95 99 } 96 100 97 file_put_contents( $jsonFile, json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ) ); 101 $encoded = json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ); 102 if($currentContent != $encoded){ 103 file_put_contents( $jsonFile, $encoded); 104 } 98 105 } 99 106 } … … 106 113 return; 107 114 } 115 116 $currentContent = ""; 117 if(is_file($jsonFile)){ 118 $currentContent = file_get_contents($jsonFile); 119 } 120 108 121 $contents = file_get_contents( $this->plugin->path . "assets/container/block.json" ); 109 122 $json = json_decode( $contents ); … … 112 125 $json->style = $container->styles()->handles; 113 126 $json->editorStyle = $container->editorStyles()->handles; 114 file_put_contents( $jsonFile, json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ) ); 127 128 $encoded = json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ); 129 if($currentContent != $encoded){ 130 file_put_contents( $jsonFile, $encoded); 131 } 115 132 } 116 133 } … … 123 140 return; 124 141 } 142 143 $currentContent = ""; 144 if(is_file($jsonFile)){ 145 $currentContent = file_get_contents($jsonFile); 146 } 147 125 148 $contents = file_get_contents( $this->plugin->path . "assets/composedBlock/block.json" ); 126 149 $json = json_decode( $contents ); … … 129 152 $json->style = $composedBlock->styles()->handles; 130 153 $json->editorStyle = $composedBlock->editorStyles()->handles; 131 file_put_contents( $jsonFile, json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ) ); 154 155 $encoded = json_encode( $json, JSON_PRETTY_PRINT+JSON_UNESCAPED_SLASHES ); 156 if($currentContent != $encoded){ 157 file_put_contents( $jsonFile, $encoded); 158 } 132 159 } 133 160 } … … 148 175 return; 149 176 } 177 178 $currentContent = ""; 179 if(is_file($styleFile)){ 180 $currentContent = file_get_contents($styleFile); 181 } 182 150 183 ob_start(); 151 184 include $this->plugin->path . "/scripts/container-styles.php"; 152 185 $css = ob_get_contents(); 153 186 ob_end_clean(); 154 file_put_contents( $styleFile, $css ); 187 188 if($currentContent != $css){ 189 file_put_contents( $styleFile, $css ); 190 } 155 191 } 156 192 } -
blockx/trunk/classes/Headless.php
r3032276 r3072937 3 3 namespace Palasthotel\WordPress\BlockX; 4 4 5 use Palasthotel\WordPress\BlockX\Blocks\_BlockType; 5 6 use Palasthotel\WordPress\BlockX\Blocks\PostEmbed; 6 7 use Palasthotel\WordPress\BlockX\Blocks\Posts; -
blockx/trunk/classes/Settings.php
r2606165 r3072937 192 192 $path = $this->plugin->bag->paths->system; 193 193 $url = $this->plugin->bag->paths->url; 194 if ( defined( ' DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS) {195 $info = __( " File mods are disabled via DISALLOW_FILE_MODSconstant.", Plugin::DOMAIN );194 if ( defined( 'BLOCKX_DISALLOW_BLOCK_JSON_GENERATION' ) && BLOCKX_DISALLOW_BLOCK_JSON_GENERATION ) { 195 $info = __( "Blockx block.json generation is disabled via BLOCKX_DISALLOW_BLOCK_JSON_GENERATION constant.", Plugin::DOMAIN ); 196 196 echo '<input type="submit" disabled="disabled" class="button" value="Regenerate" title="' . $info . '" />'; 197 echo "<p class='description'>$info</p>"; 197 198 } else { 198 199 submit_button( "Regenerate", 'secondary', 'regenerate' ); -
blockx/trunk/vendor/composer/installed.php
r3032276 r3072937 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 17b0be48c500a8db9cdaacf269bd746aa763a08b',6 'reference' => '9a5b4ae246bd288402c30e7fe6856692a1f246ab', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' 17b0be48c500a8db9cdaacf269bd746aa763a08b',16 'reference' => '9a5b4ae246bd288402c30e7fe6856692a1f246ab', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.