PHPackages                             dbout/wp-hooks - 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. [Search &amp; Filtering](/categories/search)
4. /
5. dbout/wp-hooks

ActivePackage[Search &amp; Filtering](/categories/search)

dbout/wp-hooks
==============

Wordpress hooks manager

v1.1.0(4y ago)43.2k1MITPHPPHP &gt;=7.4|8.\*

Since Apr 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/dimitriBouteille/wp-hooks)[ Packagist](https://packagist.org/packages/dbout/wp-hooks)[ Docs](https://github.com/dimitriBouteille/wp-hooks/)[ RSS](/packages/dbout-wp-hooks/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (1)

Wordpress hooks
===============

[](#wordpress-hooks)

Wordpress library that makes it easier to manage actions and filters.

[![Latest Stable Version](https://camo.githubusercontent.com/4c88cb736100bf6b564c9b8d2f6b559ac7061258edbaa50321a47a12bf4d3f45/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64626f75742f77702d686f6f6b733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dbout/wp-hooks) [![PHP Version](https://camo.githubusercontent.com/577e4376241525ab55288c0677e5a79c9928dddee922e74e9b49111384dd93bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f64626f75742f77702d686f6f6b73)](https://camo.githubusercontent.com/577e4376241525ab55288c0677e5a79c9928dddee922e74e9b49111384dd93bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f64626f75742f77702d686f6f6b73)

Requirements
------------

[](#requirements)

The server requirements are basically the same as for WordPress with the addition of a few ones :

- PHP &gt;= 7.4
- [Composer](https://getcomposer.org/) ❤️

> To simplify the integration of this library, we recommend using Wordpress with one of the following tools: [Bedrock](https://roots.io/bedrock/), [Themosis](https://framework.themosis.com/) or [Wordplate](https://github.com/wordplate/wordplate#readme).

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

[](#installation)

Install with composer, in the root of the Wordpress project run:

```
composer require dbout/wp-hooks
```

Usage
-----

[](#usage)

### Via classes

[](#via-classes)

The default use is via classes, the idea of creating a class per hook:

```
class InitHook extends \Dbout\WpHooks\Hookable\Hookable {

    protected string $hook = 'init';

    public function execute(): void
    {
        // Do something
    }
}
```

In the `function.php` file of your theme, you must now load the hook:

```
$loader = new \Dbout\WpHooks\HooksLoader();
$loader->add(InitHook::class);

$loader->register();
```

If you want, you can record several hooks with the loader:

```
$loader = new \Dbout\WpHooks\HooksLoader();
$loader
    ->add(InitHook::class)
    ->add(RegisterMenus::class)
    ->add(RegisterAssets::class);

$loader->register();
```

### Second methods

[](#second-methods)

Without instance :

```
\Dbout\WpHooks\Facade\Action::add('init', 'InitHooks@callback');
```

With custom instance :

```
\Dbout\WpHooks\Facade\Action::add('init', [new InitHooks(), 'callback']);
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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 ~687 days

Total

2

Last Release

1542d ago

PHP version history (2 changes)v1.0PHP &gt;=7.1.0

v1.1.0PHP &gt;=7.4|8.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e5be30a5fa3cbb2c1ec8b80f81d752a6700dbca5a9ab419a508293e68fbde7c?d=identicon)[dimitriBouteille](/maintainers/dimitriBouteille)

---

Top Contributors

[![dimitriBouteille](https://avatars.githubusercontent.com/u/34821762?v=4)](https://github.com/dimitriBouteille "dimitriBouteille (10 commits)")

---

Tags

composerdeprecatedhookswordpresswpwordpressfilterhookswpaction

### Embed Badge

![Health badge](/badges/dbout-wp-hooks/health.svg)

```
[![Health](https://phpackages.com/badges/dbout-wp-hooks/health.svg)](https://phpackages.com/packages/dbout-wp-hooks)
```

###  Alternatives

[tormjens/eventy

The WordPress filter/action system in Laravel

438912.9k16](/packages/tormjens-eventy)[millat/laravel-hooks

The WordPress filter, action system in Laravel

5715.1k](/packages/millat-laravel-hooks)[mitogh/katana

Filters to control where the size of images are generated.

204.4k](/packages/mitogh-katana)

PHPackages © 2026

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