Skip to content

Commit

Permalink
Merge pull request #45 from dxw/fix/block-categories-deprecation
Browse files Browse the repository at this point in the history
Fix deprecation warning for block_categories
  • Loading branch information
snim2 authored Jun 19, 2024
2 parents cd0380b + a0248d5 commit bdeac64
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.2] - 2024-06-18

### Fixed
- block_categories hook deprecation since v5.8.0

## [0.4.1] - 2023-02-09

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion app/BlockCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class BlockCategory implements \Dxw\Iguana\Registerable
{
public function register()
{
add_filter('block_categories', [$this, 'newBlocksCategory'], 10, 1);
add_filter('block_categories_all', [$this, 'newBlocksCategory'], 10, 1);
}

public function newBlocksCategory($categories)
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: GOV.UK Components
Description: Adds components from the GOV.UK Frontend to the block editor
Version: 0.4.1
Version: 0.4.2
Author: dxw
Author URI: https://www.dxw.com
*/
Expand Down
2 changes: 1 addition & 1 deletion spec/block_category.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
it('adds the filter', function () {
allow('add_filter')->toBeCalled();
expect('add_filter')->toBeCalled()->once()->with(
'block_categories',
'block_categories_all',
[ $this->blockCategory, 'newBlocksCategory' ],
10,
1
Expand Down

0 comments on commit bdeac64

Please sign in to comment.