PHPackages                             vincentvdree/wp-hooked - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. vincentvdree/wp-hooked

ActivePackage[Utility &amp; Helpers](/categories/utility)

vincentvdree/wp-hooked
======================

A small package for defining actions and filters in WordPress using classes and attributes.

1.0.1(9mo ago)066MITPHP

Since Jul 16Pushed 9mo agoCompare

[ Source](https://github.com/VincentvdRee/wp-hooked)[ Packagist](https://packagist.org/packages/vincentvdree/wp-hooked)[ RSS](/packages/vincentvdree-wp-hooked/feed)WikiDiscussions main Synced 1mo ago

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

WP-Hooked
=========

[](#wp-hooked)

WP-Hooked is a modern PHP package for registering WordPress actions and filters using PHP 8 attributes. It provides a clean and object-oriented approach to managing hooks in your WordPress projects.

Features
--------

[](#features)

- Register WordPress actions and filters using PHP attributes
- Supports priorities and accepted arguments
- Clean, maintainable, and testable code structure
- Composer compatible

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

[](#requirements)

- PHP 8.0 or higher
- WordPress 5.8 or higher

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

[](#installation)

You can install WP-Hooked via Composer. Run the following command in your WordPress project directory:

```
composer require vincentvdree/wp-hooked
```

Usage
-----

[](#usage)

To use WP-Hooked, you need to create a class and define your hooks using attributes. Here's a simple example:

```
namespace MyNamespace;

use VincentvdRee\WP_Hooked\Attributes\Action;
use VincentvdRee\WP_Hooked\Attributes\Filter;

class MyHooks
{
    #[Action('init')]
    public function onInit() {
        // Your code here
    }

    #[Filter('the_content', priority: 20, accepted_args: 2)]
    public function filterContent($content, $postId) {
        // Your code here
        return $content;
    }
}
```

```
use VincentvdRee\WP_Hooked\Hooked;

$hooked = new Hooked(namespace: 'MyNamespace');
$hooked->init();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance55

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

2

Last Release

298d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/46ac9e42d1053ef1b24ed4cdab6392f48cd9dadd19b7bd843cad628449ef476c?d=identicon)[VincentvdRee](/maintainers/VincentvdRee)

---

Top Contributors

[![vincentvdree](https://avatars.githubusercontent.com/u/25187898?v=4)](https://github.com/vincentvdree "vincentvdree (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vincentvdree-wp-hooked/health.svg)

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

PHPackages © 2026

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