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

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

level-level/clarkson-hooks
==========================

Solution for 'Just in time' WordPress Hooks.

0.1.1(8y ago)284.1k↓100%MITPHP

Since Sep 25Pushed 1y ago3 watchersCompare

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

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

Clarkson Hooks
==============

[](#clarkson-hooks)

Solution for 'Just in time' WordPress Hooks.

Clarkson-hooks combines the `all` action and composer autoloading to only include the filters you are actually going to use.

Setup
=====

[](#setup)

1. Define clarkson-hooks as a dependency.
-----------------------------------------

[](#1-define-clarkson-hooks-as-a-dependency)

`composer require level-level/clarkson-hooks`

It will load automatically.

2. Point Composer towards a directory to find your `Hooks` namespace.
---------------------------------------------------------------------

[](#2-point-composer-towards-a-directory-to-find-your-hooks-namespace)

```
"autoload": {
    "psr-4":{
        "Hooks\\": "app/Hooks"
    }
}

```

3. Define a hook
----------------

[](#3-define-a-hook)

Example minimal init.php (put this in `app/Hooks/init.php` when using path specified in composer above.

```
