Skip to content

Commit

Permalink
Minor README improvement
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
gmazzap committed May 17, 2024
1 parent d57f625 commit 49e9df1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The return value of all the functions is the number of callbacks removed.
```php
function remove_object_hook(
string $hook,
string $targetClassName,
class-string $targetClassName,
?string $methodName = null,
?int $targetPriority = null,
bool $removeStaticCallbacks = false
Expand Down Expand Up @@ -173,7 +173,7 @@ The signature is:
```php
function remove_static_method_hook(
string $hook,
string $targetClassName,
class-string $targetClassName,
?string $targetMethodName = null,
?int $targetPriority = null
): int
Expand Down Expand Up @@ -260,7 +260,7 @@ The signature:
```php
function remove_invokable_hook(
string $hook,
string $targetClassName,
class-string $targetClassName,
?int $targetPriority = null
) : int;
```
Expand Down Expand Up @@ -305,8 +305,8 @@ When passing an object instance, it removes all the hook callbacks using that ex
When passing a class name, it removes all the hook callbacks using that class (regardless the instance).

Static methods are removed when:
- an object instance is passed and `$removeStaticCallbacks` param is `true`
- a class name is passed and `$removeStaticCallbacks` param is _not_ `false`
- an object instance is passed and `$removeStaticCallbacks` param _is_ `true`
- a class name is passed and `$removeStaticCallbacks` param _is not_ `false`

### Usage Example

Expand Down Expand Up @@ -348,6 +348,8 @@ _Object Hooks Remover_ is a [Composer](https://getcomposer.org) package, install

It has no dependencies, requires **PHP 7.4+**.

It is tested and guaranteed to with WP 5.9+, but _should_ work, at least, with WP 5.3+ (which is the first version officially supporting PHP 7.4).


---

Expand Down

0 comments on commit 49e9df1

Please sign in to comment.