PHPackages                             rarst/advanced-hooks-api - 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. rarst/advanced-hooks-api

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

rarst/advanced-hooks-api
========================

Set of (experimental) wrappers that allow to hook more elaborate WordPress events without coding intermediary functions

2742PHP

Since Nov 7Pushed 11y ago4 watchersCompare

[ Source](https://github.com/Rarst/advanced-hooks-api)[ Packagist](https://packagist.org/packages/rarst/advanced-hooks-api)[ RSS](/packages/rarst-advanced-hooks-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Advanced WordPress Hooks API
============================

[](#advanced-wordpress-hooks-api)

Set of (experimental) wrappers that allow to hook more elaborate WordPress events without coding intermediary functions.

WordPress only operates with callbacks for actions and filters. That means that you always need to use callback, either:

- provided by core (limited)
- closures (messy)
- coded by yourself (this - a lot)

This plugins offers number of custom `add_*` functions to hook more elaborate events:

- `add_action_with_args()` - hook callback **and** arguments to run it with
- `add_filter_return()` - override filter with arbitrary value
- `add_filter_prepend()` and `add_filter_append()` - hook suffix/prefix values for filtered string and arrays
- `add_filter_replace()` - edit substrings or array values in filter
- `add_action_once()` and `add_filter_once()` - hook callback to only fire once
- `add_method()` - quickly add class methods to hooks of same name

Both implementation and set of functions are experimental.

Changelog
=========

[](#changelog)

0.7
---

[](#07)

- *(enhancement)* implemented `add_action_once()` and `add_filter_once()`, props Eric Mann

0.6
---

[](#06)

- *(enhancement)* changed license to MIT
- *(enhancement)* cleaned up coding style
- *(enhancement)* moved handler class to separate file
- *(enhancement)* implemented removing of handler from hooks
- **(breaking change)** changed signatures to make priority optional

0.5
---

[](#05)

- *(enhancement)* new add\_method() function
- *(enhancement)* more return points for better logic and compatibility

0.4.1
-----

[](#041)

- *(bugfix)* action() method expected argument passed (to be compatible with filters), changed to func\_get\_arg()

0.4
---

[](#04)

- Initial public repository release.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/689ddc4f33541ac4a001d247e560f8805d219a95e7e42a16e0d22b9409f385cb?d=identicon)[Rarst](/maintainers/Rarst)

---

Top Contributors

[![Rarst](https://avatars.githubusercontent.com/u/737584?v=4)](https://github.com/Rarst "Rarst (18 commits)")

### Embed Badge

![Health badge](/badges/rarst-advanced-hooks-api/health.svg)

```
[![Health](https://phpackages.com/badges/rarst-advanced-hooks-api/health.svg)](https://phpackages.com/packages/rarst-advanced-hooks-api)
```

###  Alternatives

[umpirsky/transliterator

Transliterator is a PHP library for text transliteration.

63174.9k1](/packages/umpirsky-transliterator)

PHPackages © 2026

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