diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dde5e3bb..f97d468da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,3 +7,10 @@ Plugin released! * Easily create custom blocks * 13 fields to add * Simple templating, with PHP files + +### 1.0.1 - 2020-09-01 ### + +Fix an error if Block Lab 1.5.6 is also active + +* Fixes an error with Block Lab 1.5.6, where it defines functions twice +* Error does not occur with latest Block Lab diff --git a/README.md b/README.md index d4d859e56..1aacc92d0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Tags: gutenberg, blocks, block editor, fields, template Requires at least: 5.0 Tested up to: 5.5 Requires PHP: 5.6 -Stable tag: 1.0.0 +Stable tag: 1.0.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl diff --git a/genesis-custom-blocks.php b/genesis-custom-blocks.php index e4aad03d8..c10c48adf 100644 --- a/genesis-custom-blocks.php +++ b/genesis-custom-blocks.php @@ -8,7 +8,7 @@ * * Plugin Name: Genesis Custom Blocks * Description: The easy way to build custom blocks for Gutenberg. - * Version: 1.0.0 + * Version: 1.0.1 * Author: Genesis Custom Blocks * Author URI: https://studiopress.com * License: GPL2 diff --git a/package-lock.json b/package-lock.json index daa7c704b..d952c4827 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "genesis-custom-blocks", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ad4747cba..3ed203544 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "genesis-custom-blocks", "title": "Genesis Custom Blocks", - "version": "1.0.0", + "version": "1.0.1", "description": "WordPress plugin with a simple templating system for building custom blocks.", "author": "Genesis Custom Blocks", "license": "GPL-2.0-or-later", diff --git a/php/Plugin.php b/php/Plugin.php index bdca11031..3b3921487 100644 --- a/php/Plugin.php +++ b/php/Plugin.php @@ -66,6 +66,8 @@ function() { $onboarding->plugin_activation(); } ); + + $this->require_helpers(); } /** @@ -74,7 +76,6 @@ function() { public function plugin_loaded() { $this->admin = new Admin(); $this->register_component( $this->admin ); - $this->require_helpers(); } /** @@ -92,7 +93,13 @@ public function require_deprecated() { * Requires helper functions. */ private function require_helpers() { - require_once __DIR__ . '/Helpers.php'; require_once __DIR__ . '/BlockApi.php'; + + if ( function_exists( 'block_field' ) || function_exists( 'block_value' ) ) { + return; + } + + require_once __DIR__ . '/Helpers.php'; + } }