Skip to content

Commit bdeac64

Browse files
authored
Merge pull request #45 from dxw/fix/block-categories-deprecation
Fix deprecation warning for block_categories
2 parents cd0380b + a0248d5 commit bdeac64

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.4.2] - 2024-06-18
8+
9+
### Fixed
10+
- block_categories hook deprecation since v5.8.0
11+
712
## [0.4.1] - 2023-02-09
813

914
### Fixed

app/BlockCategory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class BlockCategory implements \Dxw\Iguana\Registerable
55
{
66
public function register()
77
{
8-
add_filter('block_categories', [$this, 'newBlocksCategory'], 10, 1);
8+
add_filter('block_categories_all', [$this, 'newBlocksCategory'], 10, 1);
99
}
1010

1111
public function newBlocksCategory($categories)

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
Plugin Name: GOV.UK Components
44
Description: Adds components from the GOV.UK Frontend to the block editor
5-
Version: 0.4.1
5+
Version: 0.4.2
66
Author: dxw
77
Author URI: https://www.dxw.com
88
*/

spec/block_category.spec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
it('adds the filter', function () {
1010
allow('add_filter')->toBeCalled();
1111
expect('add_filter')->toBeCalled()->once()->with(
12-
'block_categories',
12+
'block_categories_all',
1313
[ $this->blockCategory, 'newBlocksCategory' ],
1414
10,
1515
1

0 commit comments

Comments
 (0)