Plugin Directory

Changeset 3072937


Ignore:
Timestamp:
04/18/2024 09:36:08 AM (2 years ago)
Author:
EdwardBock
Message:

release 1.10.2

Location:
blockx
Files:
8 edited
15 copied

Legend:

Unmodified
Added
Removed
  • blockx/tags/1.10.2/Plugin.php

    r3032276 r3072937  
    55 * Plugin URI: https://github.com/palasthotel/blockX
    66 * Description: Experimental blocks for palasthotel
    7  * Version: 1.10.0
     7 * Version: 1.10.2
    88 * Author: Palasthotel <rezeption@palasthotel.de> (in person: Edward Bock)
    99 * Author URI: http://www.palasthotel.de
    1010 * Requires at least: 5.0
    11  * Tested up to: 6.4.3
     11 * Tested up to: 6.5.2
    1212 * Requires PHP: 8.0
    1313 * Text Domain: blockx
    1414 * License: http://www.gnu.org/licenses/gpl-2.0.html GPLv2
    15  * @copyright Copyright (c) 2024, Palasthotel
     15 * @copyright Palasthotel
    1616 * @package Palasthotel\WordPress\BlockX
    1717 *
     
    2121
    2222require_once dirname( __FILE__ ) . "/vendor/autoload.php";
     23
     24if(!defined('BLOCKX_DISALLOW_BLOCK_JSON_GENERATION')){
     25    define('BLOCKX_DISALLOW_BLOCK_JSON_GENERATION', false);
     26}
    2327
    2428class Plugin extends Components\Plugin {
  • blockx/tags/1.10.2/README.txt

    r3032276 r3072937  
    44Tags: gutenberg, block, developer, utils
    55Requires at least: 5.0
    6 Tested up to: 6.4.3
     6Tested up to: 6.5.2
    77Requires PHP: 8.0
    8 Stable tag: 1.10.0
     8Stable tag: 1.10.2
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl
     
    3434
    3535== 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
    3642
    3743= 1.10.0 =
  • blockx/tags/1.10.2/classes/BlockAssetsGenerator.php

    r2984558 r3072937  
    4747            }
    4848        } catch (Exception $e){
    49 
     49            error_log($e->getMessage());
    5050        }
    5151    }
     
    6262                return;
    6363            }
     64            $currentContent = "";
     65            if(is_file($jsonFile)){
     66                $currentContent = file_get_contents($jsonFile);
     67            }
    6468            $contents          = file_get_contents( $this->plugin->path . "assets/block/block.json" );
    6569            $json              = json_decode( $contents );
     
    9599            }
    96100
    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            }
    98105        }
    99106    }
     
    106113                return;
    107114            }
     115
     116            $currentContent = "";
     117            if(is_file($jsonFile)){
     118                $currentContent = file_get_contents($jsonFile);
     119            }
     120
    108121            $contents          = file_get_contents( $this->plugin->path . "assets/container/block.json" );
    109122            $json              = json_decode( $contents );
     
    112125            $json->style       = $container->styles()->handles;
    113126            $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            }
    115132        }
    116133    }
     
    123140                return;
    124141            }
     142
     143            $currentContent = "";
     144            if(is_file($jsonFile)){
     145                $currentContent = file_get_contents($jsonFile);
     146            }
     147
    125148            $contents          = file_get_contents( $this->plugin->path . "assets/composedBlock/block.json" );
    126149            $json              = json_decode( $contents );
     
    129152            $json->style       = $composedBlock->styles()->handles;
    130153            $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            }
    132159        }
    133160    }
     
    148175                return;
    149176            }
     177
     178            $currentContent = "";
     179            if(is_file($styleFile)){
     180                $currentContent = file_get_contents($styleFile);
     181            }
     182
    150183            ob_start();
    151184            include $this->plugin->path . "/scripts/container-styles.php";
    152185            $css = ob_get_contents();
    153186            ob_end_clean();
    154             file_put_contents( $styleFile, $css );
     187
     188            if($currentContent != $css){
     189                file_put_contents( $styleFile, $css );
     190            }
    155191        }
    156192    }
  • blockx/tags/1.10.2/classes/Headless.php

    r3032276 r3072937  
    33namespace Palasthotel\WordPress\BlockX;
    44
     5use Palasthotel\WordPress\BlockX\Blocks\_BlockType;
    56use Palasthotel\WordPress\BlockX\Blocks\PostEmbed;
    67use Palasthotel\WordPress\BlockX\Blocks\Posts;
  • blockx/tags/1.10.2/classes/Settings.php

    r2606165 r3072937  
    192192        $path = $this->plugin->bag->paths->system;
    193193        $url  = $this->plugin->bag->paths->url;
    194         if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
    195             $info = __( "File mods are disabled via DISALLOW_FILE_MODS constant.", 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 );
    196196            echo '<input type="submit" disabled="disabled" class="button" value="Regenerate" title="' . $info . '" />';
     197            echo "<p class='description'>$info</p>";
    197198        } else {
    198199            submit_button( "Regenerate", 'secondary', 'regenerate' );
  • blockx/tags/1.10.2/vendor/composer/installed.php

    r3032276 r3072937  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '17b0be48c500a8db9cdaacf269bd746aa763a08b',
     6        'reference' => '9a5b4ae246bd288402c30e7fe6856692a1f246ab',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '17b0be48c500a8db9cdaacf269bd746aa763a08b',
     16            'reference' => '9a5b4ae246bd288402c30e7fe6856692a1f246ab',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • blockx/trunk/Plugin.php

    r3032276 r3072937  
    55 * Plugin URI: https://github.com/palasthotel/blockX
    66 * Description: Experimental blocks for palasthotel
    7  * Version: 1.10.0
     7 * Version: 1.10.2
    88 * Author: Palasthotel <rezeption@palasthotel.de> (in person: Edward Bock)
    99 * Author URI: http://www.palasthotel.de
    1010 * Requires at least: 5.0
    11  * Tested up to: 6.4.3
     11 * Tested up to: 6.5.2
    1212 * Requires PHP: 8.0
    1313 * Text Domain: blockx
    1414 * License: http://www.gnu.org/licenses/gpl-2.0.html GPLv2
    15  * @copyright Copyright (c) 2024, Palasthotel
     15 * @copyright Palasthotel
    1616 * @package Palasthotel\WordPress\BlockX
    1717 *
     
    2121
    2222require_once dirname( __FILE__ ) . "/vendor/autoload.php";
     23
     24if(!defined('BLOCKX_DISALLOW_BLOCK_JSON_GENERATION')){
     25    define('BLOCKX_DISALLOW_BLOCK_JSON_GENERATION', false);
     26}
    2327
    2428class Plugin extends Components\Plugin {
  • blockx/trunk/README.txt

    r3032276 r3072937  
    44Tags: gutenberg, block, developer, utils
    55Requires at least: 5.0
    6 Tested up to: 6.4.3
     6Tested up to: 6.5.2
    77Requires PHP: 8.0
    8 Stable tag: 1.10.0
     8Stable tag: 1.10.2
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl
     
    3434
    3535== 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
    3642
    3743= 1.10.0 =
  • blockx/trunk/classes/BlockAssetsGenerator.php

    r2984558 r3072937  
    4747            }
    4848        } catch (Exception $e){
    49 
     49            error_log($e->getMessage());
    5050        }
    5151    }
     
    6262                return;
    6363            }
     64            $currentContent = "";
     65            if(is_file($jsonFile)){
     66                $currentContent = file_get_contents($jsonFile);
     67            }
    6468            $contents          = file_get_contents( $this->plugin->path . "assets/block/block.json" );
    6569            $json              = json_decode( $contents );
     
    9599            }
    96100
    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            }
    98105        }
    99106    }
     
    106113                return;
    107114            }
     115
     116            $currentContent = "";
     117            if(is_file($jsonFile)){
     118                $currentContent = file_get_contents($jsonFile);
     119            }
     120
    108121            $contents          = file_get_contents( $this->plugin->path . "assets/container/block.json" );
    109122            $json              = json_decode( $contents );
     
    112125            $json->style       = $container->styles()->handles;
    113126            $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            }
    115132        }
    116133    }
     
    123140                return;
    124141            }
     142
     143            $currentContent = "";
     144            if(is_file($jsonFile)){
     145                $currentContent = file_get_contents($jsonFile);
     146            }
     147
    125148            $contents          = file_get_contents( $this->plugin->path . "assets/composedBlock/block.json" );
    126149            $json              = json_decode( $contents );
     
    129152            $json->style       = $composedBlock->styles()->handles;
    130153            $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            }
    132159        }
    133160    }
     
    148175                return;
    149176            }
     177
     178            $currentContent = "";
     179            if(is_file($styleFile)){
     180                $currentContent = file_get_contents($styleFile);
     181            }
     182
    150183            ob_start();
    151184            include $this->plugin->path . "/scripts/container-styles.php";
    152185            $css = ob_get_contents();
    153186            ob_end_clean();
    154             file_put_contents( $styleFile, $css );
     187
     188            if($currentContent != $css){
     189                file_put_contents( $styleFile, $css );
     190            }
    155191        }
    156192    }
  • blockx/trunk/classes/Headless.php

    r3032276 r3072937  
    33namespace Palasthotel\WordPress\BlockX;
    44
     5use Palasthotel\WordPress\BlockX\Blocks\_BlockType;
    56use Palasthotel\WordPress\BlockX\Blocks\PostEmbed;
    67use Palasthotel\WordPress\BlockX\Blocks\Posts;
  • blockx/trunk/classes/Settings.php

    r2606165 r3072937  
    192192        $path = $this->plugin->bag->paths->system;
    193193        $url  = $this->plugin->bag->paths->url;
    194         if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
    195             $info = __( "File mods are disabled via DISALLOW_FILE_MODS constant.", 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 );
    196196            echo '<input type="submit" disabled="disabled" class="button" value="Regenerate" title="' . $info . '" />';
     197            echo "<p class='description'>$info</p>";
    197198        } else {
    198199            submit_button( "Regenerate", 'secondary', 'regenerate' );
  • blockx/trunk/vendor/composer/installed.php

    r3032276 r3072937  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => '17b0be48c500a8db9cdaacf269bd746aa763a08b',
     6        'reference' => '9a5b4ae246bd288402c30e7fe6856692a1f246ab',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => '17b0be48c500a8db9cdaacf269bd746aa763a08b',
     16            'reference' => '9a5b4ae246bd288402c30e7fe6856692a1f246ab',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.