diff --git a/.changeset/angry-coins-think.md b/.changeset/angry-coins-think.md deleted file mode 100644 index a218c7b1..00000000 --- a/.changeset/angry-coins-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -Bug Fix: CPTs containing dashes creates error in Block Registration. diff --git a/.changeset/blue-ducks-happen.md b/.changeset/blue-ducks-happen.md deleted file mode 100644 index 4e7787f3..00000000 --- a/.changeset/blue-ducks-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -chore: bump min PHP version to 7.4 diff --git a/.changeset/bright-avocados-design.md b/.changeset/bright-avocados-design.md deleted file mode 100644 index 01c9f47c..00000000 --- a/.changeset/bright-avocados-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Correctly check if `$block_attributes` are set when attempting to register the block attribute fields to WPGraphQL. diff --git a/.changeset/chilled-cameras-grin.md b/.changeset/chilled-cameras-grin.md deleted file mode 100644 index 3985337d..00000000 --- a/.changeset/chilled-cameras-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Implement better type checking in `ContentBlocksResolver::resolve_content_blocks()` to prevent possible fatal errors on edge cases. diff --git a/.changeset/chilly-spies-wash.md b/.changeset/chilly-spies-wash.md deleted file mode 100644 index 77ac21a6..00000000 --- a/.changeset/chilly-spies-wash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -Use render_block instead of innerHTML when filtering blocks diff --git a/.changeset/cuddly-countries-doubt.md b/.changeset/cuddly-countries-doubt.md deleted file mode 100644 index 0c9f2ea8..00000000 --- a/.changeset/cuddly-countries-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -dev: Change comparison of `$attribute_config['type']` to use Yoda conditional. diff --git a/.changeset/fair-students-move.md b/.changeset/fair-students-move.md deleted file mode 100644 index a2ee84f6..00000000 --- a/.changeset/fair-students-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Ensure `WPHelpers::get_supported_post_types()` correctly returns `\WP_Post_Type[]`. diff --git a/.changeset/few-seas-happen.md b/.changeset/few-seas-happen.md deleted file mode 100644 index 4b8a85e4..00000000 --- a/.changeset/few-seas-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -chore: Add missing `\` to docblock types. diff --git a/.changeset/flat-buttons-shake.md b/.changeset/flat-buttons-shake.md deleted file mode 100644 index 87b47aca..00000000 --- a/.changeset/flat-buttons-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -tests: Fix `RegistryTestCase` autoloading and lint `DomHelperTest` diff --git a/.changeset/forty-cobras-swim.md b/.changeset/forty-cobras-swim.md deleted file mode 100644 index 63c46afc..00000000 --- a/.changeset/forty-cobras-swim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": minor ---- - -Fix regression where intentionally empty blocks were removed, if blocks have names they are now retained. diff --git a/.changeset/funny-boxes-study.md b/.changeset/funny-boxes-study.md deleted file mode 100644 index 26ce0759..00000000 --- a/.changeset/funny-boxes-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Cleanup unnecessary conditional checks. diff --git a/.changeset/good-colts-develop.md b/.changeset/good-colts-develop.md deleted file mode 100644 index 074ff08f..00000000 --- a/.changeset/good-colts-develop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Don't return the `WPGraphQLContentBlocks` instance when initializing the plugin via the `plugins_loaded` action. diff --git a/.changeset/gorgeous-horses-arrive.md b/.changeset/gorgeous-horses-arrive.md deleted file mode 100644 index b0a82766..00000000 --- a/.changeset/gorgeous-horses-arrive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": minor ---- - -Add support for Reusable Blocks diff --git a/.changeset/great-ravens-joke.md b/.changeset/great-ravens-joke.md deleted file mode 100644 index 00c2fec8..00000000 --- a/.changeset/great-ravens-joke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": minor ---- - -Fix regression with addition of anchor support - only register interface once diff --git a/.changeset/green-bobcats-cover.md b/.changeset/green-bobcats-cover.md deleted file mode 100644 index fc802b7d..00000000 --- a/.changeset/green-bobcats-cover.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -dev: Remove unused method params from the block attribute field resolver callback. diff --git a/.changeset/hot-files-jump.md b/.changeset/hot-files-jump.md deleted file mode 100644 index b4c70a7f..00000000 --- a/.changeset/hot-files-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Replace the usage of `'wp-graphql'` text-domain with the correct `'wp-graphql-content-blocks'`. diff --git a/.changeset/long-gorillas-rescue.md b/.changeset/long-gorillas-rescue.md deleted file mode 100644 index 5f3e1ade..00000000 --- a/.changeset/long-gorillas-rescue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -chore: Add missing return types to multiple methods. diff --git a/.changeset/orange-actors-watch.md b/.changeset/orange-actors-watch.md deleted file mode 100644 index 642ace9d..00000000 --- a/.changeset/orange-actors-watch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Implement better type checking in `Blocks\Block` class to prevent possible fatal errors on edge cases. diff --git a/.changeset/poor-books-heal.md b/.changeset/poor-books-heal.md deleted file mode 100644 index 8500dbf6..00000000 --- a/.changeset/poor-books-heal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Improve `WPGraphQLHelpers::format_type_name()` handling of `null` and empty strings, and use it in more places in the codebase. diff --git a/.changeset/pretty-owls-decide.md b/.changeset/pretty-owls-decide.md deleted file mode 100644 index ea4ee6b8..00000000 --- a/.changeset/pretty-owls-decide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -Added `cssClassName` attribute on `CoreQuote` Block diff --git a/.changeset/purple-rockets-promise.md b/.changeset/purple-rockets-promise.md deleted file mode 100644 index 9e44409d..00000000 --- a/.changeset/purple-rockets-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Bad check for empty value in `DOMHelpers::parseFirstNodeAttribute()`. diff --git a/.changeset/quiet-boxes-relax.md b/.changeset/quiet-boxes-relax.md deleted file mode 100644 index 20086506..00000000 --- a/.changeset/quiet-boxes-relax.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -dev: Rename `WPGraphQL\ContentBlocks\Registry::OnInit()` and `WPGraphQL\ContentBlocks\Type\Scalar::OnInit()` methods to `::init()` to comply with WPCS ruleset. diff --git a/.changeset/rare-snakes-return.md b/.changeset/rare-snakes-return.md deleted file mode 100644 index c57b2223..00000000 --- a/.changeset/rare-snakes-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -dev: Remove unnecessary `use( $type_registry )` from Interface 'resolveType' callbacks. diff --git a/.changeset/rare-toes-brush.md b/.changeset/rare-toes-brush.md deleted file mode 100644 index c171e798..00000000 --- a/.changeset/rare-toes-brush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": minor ---- - -Rename BlockAttributesObject() to get_block_attributes_object_type_name diff --git a/.changeset/rude-penguins-develop.md b/.changeset/rude-penguins-develop.md deleted file mode 100644 index 70c68571..00000000 --- a/.changeset/rude-penguins-develop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -chore: Disable PHPCS linting for `/tests` directory diff --git a/.changeset/silver-poems-move.md b/.changeset/silver-poems-move.md deleted file mode 100644 index 2e69d7f0..00000000 --- a/.changeset/silver-poems-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -chore: Fix existing PHPCS smells for doc-blocks and comments. diff --git a/.changeset/strong-paws-pump.md b/.changeset/strong-paws-pump.md deleted file mode 100644 index a7986c1b..00000000 --- a/.changeset/strong-paws-pump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -dev: Deprecate the unused `$context` param on EditorBlockInterface::get_blocks(), and update all internal usage of that method. diff --git a/.changeset/ten-fishes-breathe.md b/.changeset/ten-fishes-breathe.md deleted file mode 100644 index b4a161bd..00000000 --- a/.changeset/ten-fishes-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Ensure proper string translation, concatenation, and escaping. diff --git a/.changeset/three-ways-dress.md b/.changeset/three-ways-dress.md deleted file mode 100644 index b67114c4..00000000 --- a/.changeset/three-ways-dress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Use `wp_rand()` instead of `rand()`. diff --git a/.changeset/two-numbers-end.md b/.changeset/two-numbers-end.md deleted file mode 100644 index f26dbf76..00000000 --- a/.changeset/two-numbers-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -chore: Set the minimum PHP version in `composer.json` to v7.2 (and the platform req to v7.3) to ensure contributions are built against the correct dependencies. diff --git a/.changeset/wise-boxes-teach.md b/.changeset/wise-boxes-teach.md deleted file mode 100644 index 6de8fabd..00000000 --- a/.changeset/wise-boxes-teach.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@wpengine/wp-graphql-content-blocks": patch ---- - -fix: Use strict string comparison when parsing the attribute selector. diff --git a/CHANGELOG.md b/CHANGELOG.md index abb30a83..c6ff8af9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,44 @@ # WPGraphQL Content Blocks +## 0.3.0 + +### Minor Changes + +- 5765443: Fix regression where intentionally empty blocks were removed, if blocks have names they are now retained. +- eb8e364: Add support for Reusable Blocks +- 1bde257: Fix regression with addition of anchor support - only register interface once +- bc0b5a4: Rename BlockAttributesObject() to get_block_attributes_object_type_name + +### Patch Changes + +- a42c828: Bug Fix: CPTs containing dashes creates error in Block Registration. +- b900f1f: chore: bump min PHP version to 7.4 +- b075a98: fix: Correctly check if `$block_attributes` are set when attempting to register the block attribute fields to WPGraphQL. +- 5d043b4: fix: Implement better type checking in `ContentBlocksResolver::resolve_content_blocks()` to prevent possible fatal errors on edge cases. +- 6621170: Use render_block instead of innerHTML when filtering blocks +- 8b13b32: dev: Change comparison of `$attribute_config['type']` to use Yoda conditional. +- addf06f: fix: Ensure `WPHelpers::get_supported_post_types()` correctly returns `\WP_Post_Type[]`. +- eff9847: chore: Add missing `\` to docblock types. +- 733737f: tests: Fix `RegistryTestCase` autoloading and lint `DomHelperTest` +- ddac2eb: fix: Cleanup unnecessary conditional checks. +- 536848a: fix: Don't return the `WPGraphQLContentBlocks` instance when initializing the plugin via the `plugins_loaded` action. +- 8b13b32: dev: Remove unused method params from the block attribute field resolver callback. +- 8b13b32: fix: Replace the usage of `'wp-graphql'` text-domain with the correct `'wp-graphql-content-blocks'`. +- 99bc5a4: chore: Add missing return types to multiple methods. +- f6541d9: fix: Implement better type checking in `Blocks\Block` class to prevent possible fatal errors on edge cases. +- f0bc286: fix: Improve `WPGraphQLHelpers::format_type_name()` handling of `null` and empty strings, and use it in more places in the codebase. +- 11c0676: Added `cssClassName` attribute on `CoreQuote` Block +- 45f9ce3: fix: Bad check for empty value in `DOMHelpers::parseFirstNodeAttribute()`. +- 56f1b1e: dev: Rename `WPGraphQL\ContentBlocks\Registry::OnInit()` and `WPGraphQL\ContentBlocks\Type\Scalar::OnInit()` methods to `::init()` to comply with WPCS ruleset. +- fe38180: dev: Remove unnecessary `use( $type_registry )` from Interface 'resolveType' callbacks. +- c7290cd: chore: Disable PHPCS linting for `/tests` directory +- ee722d2: chore: Fix existing PHPCS smells for doc-blocks and comments. +- 2f02d7d: dev: Deprecate the unused `$context` param on EditorBlockInterface::get_blocks(), and update all internal usage of that method. +- 8b13b32: fix: Ensure proper string translation, concatenation, and escaping. +- f44fb6f: fix: Use `wp_rand()` instead of `rand()`. +- 16d43eb: chore: Set the minimum PHP version in `composer.json` to v7.2 (and the platform req to v7.3) to ensure contributions are built against the correct dependencies. +- 949af70: fix: Use strict string comparison when parsing the attribute selector. + ## 0.2.1 ### Patch Changes diff --git a/includes/WPGraphQLContentBlocks.php b/includes/WPGraphQLContentBlocks.php index c12a02c5..41b6c188 100644 --- a/includes/WPGraphQLContentBlocks.php +++ b/includes/WPGraphQLContentBlocks.php @@ -78,7 +78,7 @@ private function setup_constants() { $main_file_path = dirname( __DIR__ ) . '/wp-graphql.php'; // Plugin version. - $this->define( 'WPGRAPHQL_CONTENT_BLOCKS_VERSION', '0.2.1' ); + $this->define( 'WPGRAPHQL_CONTENT_BLOCKS_VERSION', '0.3.0' ); // Plugin Folder Path. $this->define( 'WPGRAPHQL_CONTENT_BLOCKS_PLUGIN_DIR', plugin_dir_path( $main_file_path ) ); // Plugin Root File. diff --git a/package.json b/package.json index 60d0c4e3..b885b0ae 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@wpengine/wp-graphql-content-blocks", "private": true, - "version": "0.2.1", + "version": "0.3.0", "engines": { "node": ">=16.0.0" }, diff --git a/readme.txt b/readme.txt index 30dd4f7b..8931246d 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: blakewpe, chriswiegman, joefusco, matthewguywright, TeresaGobble, Tags: faustjs, faust, headless, decoupled, gutenberg Requires at least: 5.7 Tested up to: 6.1 -Stable tag: 0.2.1 +Stable tag: 0.3.0 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -25,6 +25,45 @@ Extends WPGraphQL to support querying (Gutenberg) Blocks as data. == Changelog == += 0.3.0 = + +### Minor Changes + +- 5765443: Fix regression where intentionally empty blocks were removed, if blocks have names they are now retained. +- eb8e364: Add support for Reusable Blocks +- 1bde257: Fix regression with addition of anchor support - only register interface once +- bc0b5a4: Rename BlockAttributesObject() to get_block_attributes_object_type_name + +### Patch Changes + +- a42c828: Bug Fix: CPTs containing dashes creates error in Block Registration. +- b900f1f: chore: bump min PHP version to 7.4 +- b075a98: fix: Correctly check if `$block_attributes` are set when attempting to register the block attribute fields to WPGraphQL. +- 5d043b4: fix: Implement better type checking in `ContentBlocksResolver::resolve_content_blocks()` to prevent possible fatal errors on edge cases. +- 6621170: Use render_block instead of innerHTML when filtering blocks +- 8b13b32: dev: Change comparison of `$attribute_config['type']` to use Yoda conditional. +- addf06f: fix: Ensure `WPHelpers::get_supported_post_types()` correctly returns `\WP_Post_Type[]`. +- eff9847: chore: Add missing `\` to docblock types. +- 733737f: tests: Fix `RegistryTestCase` autoloading and lint `DomHelperTest` +- ddac2eb: fix: Cleanup unnecessary conditional checks. +- 536848a: fix: Don't return the `WPGraphQLContentBlocks` instance when initializing the plugin via the `plugins_loaded` action. +- 8b13b32: dev: Remove unused method params from the block attribute field resolver callback. +- 8b13b32: fix: Replace the usage of `'wp-graphql'` text-domain with the correct `'wp-graphql-content-blocks'`. +- 99bc5a4: chore: Add missing return types to multiple methods. +- f6541d9: fix: Implement better type checking in `Blocks\Block` class to prevent possible fatal errors on edge cases. +- f0bc286: fix: Improve `WPGraphQLHelpers::format_type_name()` handling of `null` and empty strings, and use it in more places in the codebase. +- 11c0676: Added `cssClassName` attribute on `CoreQuote` Block +- 45f9ce3: fix: Bad check for empty value in `DOMHelpers::parseFirstNodeAttribute()`. +- 56f1b1e: dev: Rename `WPGraphQL\ContentBlocks\Registry::OnInit()` and `WPGraphQL\ContentBlocks\Type\Scalar::OnInit()` methods to `::init()` to comply with WPCS ruleset. +- fe38180: dev: Remove unnecessary `use( $type_registry )` from Interface 'resolveType' callbacks. +- c7290cd: chore: Disable PHPCS linting for `/tests` directory +- ee722d2: chore: Fix existing PHPCS smells for doc-blocks and comments. +- 2f02d7d: dev: Deprecate the unused `$context` param on EditorBlockInterface::get_blocks(), and update all internal usage of that method. +- 8b13b32: fix: Ensure proper string translation, concatenation, and escaping. +- f44fb6f: fix: Use `wp_rand()` instead of `rand()`. +- 16d43eb: chore: Set the minimum PHP version in `composer.json` to v7.2 (and the platform req to v7.3) to ensure contributions are built against the correct dependencies. +- 949af70: fix: Use strict string comparison when parsing the attribute selector. + = 0.2.1 = ### Patch Changes @@ -52,8 +91,4 @@ Extends WPGraphQL to support querying (Gutenberg) Blocks as data. - e57855f: Remove the `composer install` step by bundling the prod `vendor` directory with the plugin - e965de9: Fixed: Undefined index error in Block.php. Thanks @kidunot89! -= 0.1.0 = - -- Proof of concept. - -[View the full changelog](https://github.com/wpengine/wp-graphql-content-blocks/blob/main/CHANGELOG.md) +[View the full changelog](https://github.com/wpengine/wp-graphql-content-blocks/blob/main/CHANGELOG.md) \ No newline at end of file diff --git a/wp-graphql-content-blocks.php b/wp-graphql-content-blocks.php index 60b0dded..5707ae23 100644 --- a/wp-graphql-content-blocks.php +++ b/wp-graphql-content-blocks.php @@ -8,7 +8,7 @@ * License URI: https://www.gnu.org/licenses/gpl-2.0.html * Text Domain: wp-graphql-content-blocks * Domain Path: /languages - * Version: 0.2.1 + * Version: 0.3.0 * Requires PHP: 7.4 * Requires at least: 5.7 *