PHPackages                             yard/brave-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. yard/brave-hooks

ActivePackage

yard/brave-hooks
================

Brave hooks

v2.3.1(2mo ago)11.5k↓35.7%[2 issues](https://github.com/yardinternet/brave-hooks/issues)[3 PRs](https://github.com/yardinternet/brave-hooks/pulls)MITPHPPHP &gt;=8.2CI passing

Since Nov 21Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/yardinternet/brave-hooks)[ Packagist](https://packagist.org/packages/yard/brave-hooks)[ RSS](/packages/yard-brave-hooks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (41)Used By (0)

Brave Hooks
===========

[](#brave-hooks)

[![Code Style](https://github.com/yardinternet/brave-hooks/actions/workflows/format-php.yml/badge.svg?no-cache)](https://github.com/yardinternet/brave-hooks/actions/workflows/format-php.yml)

Features
--------

[](#features)

- Register Hooks using php attributes
- Configure Hook registration using a config file
- Load plugin-specific hooks only when the plugin is active

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

[](#installation)

1. Install this package with Composer:

    ```
    composer require yard/brave-hooks
    ```
2. Run the Acorn WP-CLI command to discover this package:

    ```
    wp acorn package:discover
    ```
3. Publish the config file with:

    ```
    wp acorn vendor:publish --provider="Yard\Brave\Hooks\HookServiceProvider"
    ```
4. Register all your project hooks in the published configuration file `config/hooks.php`.

Usage
-----

[](#usage)

Add your custom hook classes to the [hooks configuration file](./config/hooks.php). Any hooks defined within these classes will be automatically registered with WordPress.

This plugin leverages [wp-hook-registrar](https://github.com/yardinternet/wp-hook-registrar) for hook registration. For detailed information about the hook registration process, please refer to that package's documentation.

### Plugin-specific Hooks

[](#plugin-specific-hooks)

Some classes contain hooks that should only be active when a specific WordPress plugin is active. To achieve this, add the `#[Plugin]` attribute to the class containing hooks and provide the plugin's file path:

The plugin path should match the format required by the WordPress function [is\_plugin\_active()](https://developer.wordpress.org/reference/functions/is_plugin_active/)

```
#[Plugin('advanced-custom-fields-pro/acf.php')]
class ACF
{
    ...
}
```

About us
--------

[](#about-us)

[![banner](https://raw.githubusercontent.com/yardinternet/.github/refs/heads/main/profile/assets/small-banner-github.svg)](https://www.yard.nl/werken-bij/)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance68

Regular maintenance activity

Popularity23

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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

Total

33

Last Release

78d ago

Major Versions

v1.2.2 → v2.0.02025-10-23

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v2.1.1PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62775?v=4)[Anton Zhuravsky](/maintainers/Yard)[@yard](https://github.com/yard)

---

Top Contributors

[![SimonvanWijhe](https://avatars.githubusercontent.com/u/41121933?v=4)](https://github.com/SimonvanWijhe "SimonvanWijhe (32 commits)")[![ictbeheer](https://avatars.githubusercontent.com/u/14947039?v=4)](https://github.com/ictbeheer "ictbeheer (22 commits)")[![YvetteNikolov](https://avatars.githubusercontent.com/u/48315669?v=4)](https://github.com/YvetteNikolov "YvetteNikolov (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![Rovasch](https://avatars.githubusercontent.com/u/166744617?v=4)](https://github.com/Rovasch "Rovasch (9 commits)")[![laravdiemen](https://avatars.githubusercontent.com/u/80510718?v=4)](https://github.com/laravdiemen "laravdiemen (7 commits)")[![WybeBosch](https://avatars.githubusercontent.com/u/40889930?v=4)](https://github.com/WybeBosch "WybeBosch (6 commits)")[![Yannicvanveen](https://avatars.githubusercontent.com/u/1272906?v=4)](https://github.com/Yannicvanveen "Yannicvanveen (3 commits)")[![FreakyWizard](https://avatars.githubusercontent.com/u/114140418?v=4)](https://github.com/FreakyWizard "FreakyWizard (2 commits)")[![robertbossaert](https://avatars.githubusercontent.com/u/4972135?v=4)](https://github.com/robertbossaert "robertbossaert (2 commits)")[![yard-bot](https://avatars.githubusercontent.com/u/66111179?v=4)](https://github.com/yard-bot "yard-bot (2 commits)")[![dtakken](https://avatars.githubusercontent.com/u/2066447?v=4)](https://github.com/dtakken "dtakken (1 commits)")

---

Tags

acornbravewordpress

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/yard-brave-hooks/health.svg)

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[mohamedsabil83/laravel-hijrian

Hijri-Gregorian date converter for Laravel

1220.0k](/packages/mohamedsabil83-laravel-hijrian)

PHPackages © 2026

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