Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agence-adeliom/lumberjack-hooks
[READ-ONLY] Register WordPress hooks, filters and shortcodes with PHP Attributes into Lumberjack
https://github.com/agence-adeliom/lumberjack-hooks
hooks lumberjack php-attributes timber wordpress
Last synced: 24 days ago
JSON representation
[READ-ONLY] Register WordPress hooks, filters and shortcodes with PHP Attributes into Lumberjack
- Host: GitHub
- URL: https://github.com/agence-adeliom/lumberjack-hooks
- Owner: agence-adeliom
- License: mit
- Created: 2022-09-05T12:31:42.000Z (over 2 years ago)
- Default Branch: 1.x
- Last Pushed: 2024-06-20T16:15:22.000Z (6 months ago)
- Last Synced: 2024-11-24T17:49:09.472Z (28 days ago)
- Topics: hooks, lumberjack, php-attributes, timber, wordpress
- Language: PHP
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [READ-ONLY] Lumberjack Hooks
Register WordPress hooks, filters and shortcodes with PHP Attributes
## Requirements
* PHP 8.0 or greater
* Composer
* Lumberjack## Installation
```bash
composer require agence-adeliom/lumberjack-hooks# Copy the configuration file
cp vendor/agence-adeliom/lumberjack-hooks/config/hooks.php web/app/themes/YOUR_THEME/config/hooks.php
```#### Register the service provider into web/app/themes/YOUR_THEME/config/app.php
```php
'providers' => [
...
\Adeliom\Lumberjack\Hooks\HookProvider::class
]
```## Usage
Create your hook class :
```php
[
...
App\Hooks\MyClass::class
],
];
```And you're done!
# API
```php
#[Action(tag: "the hook name", priority: 1, accepted_args: 1)]
#[Filter(tag: "the filter name", priority: 1, accepted_args: 1)]
#[Shortcode(tag: "the shortcode code", priority: 1, accepted_args: 1)]
```## License
Lumberjack Hooks is released under [the MIT License](LICENSE).