Skip to content

Commit fe62551

Browse files
authored
chore!: bump WPGraphQL Content Blocks to v4.6.0 (#77)
* chore!: bump minimum version of `wp-graphql-content-blocks` to v4.6.0 and remove updater * dev: add snapwp-helper to the plugin auto-updater.
1 parent 1d316ba commit fe62551

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SnapWP Helper is a WordPress plugin that allows you to quickly install WPGraphQL
2121
- **PHP** 7.4 or higher
2222
- **WordPress** 6.7 or higher
2323
- **WPGraphQL** 1.28.0 or higher
24-
- **WPGraphQL Content Blocks** 4.4.0 or higher
24+
- **WPGraphQL Content Blocks** 4.6.0 or higher
2525

2626
## Getting Started
2727

src/Modules/GraphQL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function get_wpgraphql_dependency_args(): array {
122122
* @return array{slug:string,name:string,check_callback:callable():(true|\WP_Error)}
123123
*/
124124
protected function get_wpgraphql_content_blocks_dependency_args(): array {
125-
$minimum_version = '4.4.0';
125+
$minimum_version = '4.6.0';
126126

127127
return [
128128
'slug' => 'wp-graphql-content-blocks',

src/Modules/GraphQL/Data/ContentBlocksResolver.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,7 @@ private static function handle_do_block( array $block ): ?array {
150150
$block = self::populate_reusable_blocks( $block );
151151
$block = self::populate_pattern_inner_blocks( $block );
152152

153-
/**
154-
* Filters the block data after it has been processed.
155-
*
156-
* @param array<string,mixed> $block The block data.
157-
*/
158-
$block = apply_filters( 'wpgraphql_content_blocks_handle_do_block', $block ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WPGraphQL filter.
159-
153+
// @todo evaluate populate_navigation_blocks().
160154
// Prepare innerBlocks.
161155
if ( ! empty( $block['innerBlocks'] ) ) {
162156
$block['innerBlocks'] = self::handle_do_blocks( $block['innerBlocks'] );

src/Modules/PluginUpdater.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class PluginUpdater implements Module {
2929
private function get_plugins(): array {
3030
$plugins = [
3131
[
32-
'slug' => 'wp-graphql-content-blocks',
33-
'file_path' => 'wp-graphql-content-blocks/wp-graphql-content-blocks.php',
34-
'update_uri' => 'https://github.com/wpengine/wp-graphql-content-blocks',
32+
'slug' => 'snapwp-helper',
33+
'file_path' => 'snapwp-helper/snapwp-helper.php',
34+
'update_uri' => 'https://github.com/rtCamp/snapwp-helper',
3535
],
3636
[
3737
'slug' => 'wpgraphql-ide',

tests/Integration/UpdateCheckerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Tests the UpdateChecker class.
44
*
55
* @package SnapWP\Helper\Tests\Integration
6+
*
7+
* @todo update tests to use something other than wp-graphql-content-blocks.
68
*/
79

810
namespace SnapWP\Helper\Tests\Integration;

0 commit comments

Comments
 (0)