PHPackages                             handmadeweb/hookable-actions-filters - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. handmadeweb/hookable-actions-filters

ActiveLibrary

handmadeweb/hookable-actions-filters
====================================

1.1.0(4y ago)01.7k[1 issues](https://github.com/HandmadeWeb/hookable-actions-filters/issues)MITPHPPHP ^7.3||^8.0

Since Jul 27Pushed 4y ago1 watchersCompare

[ Source](https://github.com/HandmadeWeb/hookable-actions-filters)[ Packagist](https://packagist.org/packages/handmadeweb/hookable-actions-filters)[ Docs](https://github.com/handmadeweb/hookable-actions-filters)[ RSS](/packages/handmadeweb-hookable-actions-filters/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d9ded653f95c107fdd83d54506c472330690e0150ba3ace8d05054fbf59692e8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616e646d6164657765622f686f6f6b61626c652d616374696f6e732d66696c746572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/handmadeweb/hookable-actions-filters)[![Total Downloads](https://camo.githubusercontent.com/dd1a601404c3cea53a53cae7f9dac2223dea76ec7ee9186048325088f7d09ecc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616e646d6164657765622f686f6f6b61626c652d616374696f6e732d66696c746572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/handmadeweb/hookable-actions-filters)[![MIT Licensed](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Run Tests](https://github.com/handmadeweb/hookable-actions-filters/actions/workflows/tests.yml/badge.svg)](https://github.com/handmadeweb/hookable-actions-filters/actions/workflows/tests.yml)

Hookable Actions And Filters is an Action and Filter library inspired by WordPress's Actions and Filters. This package can be used in Laravel and supports auto discovery, alternatively the package can also be used in any PHP project.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require handmadeweb/hookable-actions-filters
```

Usage
-----

[](#usage)

### Action Examples

[](#action-examples)

```
use HandmadeWeb\ActionsAndFilters\Action;

// Eample function for test
function action_test($key){
    unset($_GET[$key]);
}

// Add a action callback to a function by name
Action::add('unset', 'action_test');
// Or

// Add a action callback to a closure function
Action::add('unset', function($key){
    action_test($key);
    // Or this closure function could just do unset($_GET[$key]);
});

// Execute the action, which in this example will unset $_GET['foobar']
Action::run('unset', 'foobar');
```

### Filter Examples

[](#filter-examples)

```
use HandmadeWeb\ActionsAndFilters\Filter;

// Add a filter callback to a function by name
Filter::add('Test', 'ucfirst');

// Add a filter callback to a closure function
Filter::add('Test', function($value){
    return "{$value} {$value}";
});

// Will return Foobar Foobar
Filter::run('Test', 'foobar');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](https://github.com/handmadeweb/hookable-actions-filters/blob/master/CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/handmadeweb/hookable-actions-filters/blob/master/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Handmade Web &amp; Design](https://github.com/handmadeweb)
- [Michael Rook](https://github.com/michaelr0)
- [All Contributors](https://github.com/handmadeweb/hookable-actions-filters/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/handmadeweb/hookable-actions-filters/blob/master/LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~244 days

Total

2

Last Release

1502d ago

PHP version history (2 changes)1.0.0PHP ^7.3 || ^8.0

1.1.0PHP ^7.3||^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e7a98568b1db97131b747177e0460eac0afd7e5bb47569243f9656f5da2bc4f?d=identicon)[HandmadeWeb](/maintainers/HandmadeWeb)

---

Top Contributors

[![michaelr0](https://avatars.githubusercontent.com/u/54159303?v=4)](https://github.com/michaelr0 "michaelr0 (8 commits)")

---

Tags

filtersactionshookablehandmadeweb

### Embed Badge

![Health badge](/badges/handmadeweb-hookable-actions-filters/health.svg)

```
[![Health](https://phpackages.com/badges/handmadeweb-hookable-actions-filters/health.svg)](https://phpackages.com/packages/handmadeweb-hookable-actions-filters)
```

###  Alternatives

[tormjens/eventy

The WordPress filter/action system in Laravel

438912.9k16](/packages/tormjens-eventy)[bainternet/php-hooks

A fork of the WordPress filters hook system rolled in to a class to be ported into any PHP-based system

27621.3k2](/packages/bainternet-php-hooks)[voku/php-hooks

A fork of the WordPress filters hook system rolled in to a class to be ported into any PHP-based system

7637.3k3](/packages/voku-php-hooks)[x-wp/di

The dependency injection container for WordPress

301.1k10](/packages/x-wp-di)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
