Skip to content

Commit 3fe07f1

Browse files
committed
fix: Added Handler compatibility class
1 parent e0de61f commit 3fe07f1

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

src/Decorators/Action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Action decorator.
1515
*
16-
* @deprecated 1.0.0 Use `XWP\Hook\Decorators\Action` instead.
16+
* @deprecated 2.0.0 Use `XWP\Hook\Decorators\Action` instead.
1717
*/
1818
#[\Attribute( \Attribute::TARGET_FUNCTION | \Attribute::IS_REPEATABLE | \Attribute::TARGET_METHOD )]
1919
class Action extends New_Action {

src/Decorators/Filter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Filter decorator.
1515
*
16-
* @deprecated 1.0.0 Use `XWP\Hook\Decorators\Filter` instead.
16+
* @deprecated 2.0.0 Use `XWP\Hook\Decorators\Filter` instead.
1717
*/
1818
#[\Attribute( \Attribute::TARGET_FUNCTION | \Attribute::IS_REPEATABLE | \Attribute::TARGET_METHOD )]
1919
class Filter extends New_Filter {

src/Decorators/Handler.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
/**
3+
* Hookable attribute class file.
4+
*
5+
* @package WP Utils
6+
* @subpackage Decorators
7+
*/
8+
9+
namespace Oblak\WP\Decorators;
10+
11+
use Attribute;
12+
use XWP\Hook\Decorators\Handler as New_Handler;
13+
14+
/**
15+
* Defines class as hookable - it will be automatically constructed on given hook with given priority.
16+
*
17+
* @deprecated 2.0.0 Use `XWP\Hook\Decorators\Handler` instead.
18+
*/
19+
#[Attribute( Attribute::TARGET_CLASS )]
20+
class Handler extends New_Handler {
21+
}

src/Decorators/Hookable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* Defines class as hookable - it will be automatically constructed on given hook with given priority.
1616
*
17-
* @deprecated 1.0.0 Use `XWP\Hook\Decorators\Handler` instead.
17+
* @deprecated 2.0.0 Use `XWP\Hook\Decorators\Handler` instead.
1818
*/
1919
#[Attribute( Attribute::TARGET_CLASS )]
2020
class Hookable extends Handler {

0 commit comments

Comments
 (0)