Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crtl/wp-plugin-base
Provides API to register wordpress hooks and actions using PHP8 Attributes and reflection API
https://github.com/crtl/wp-plugin-base
Last synced: 4 days ago
JSON representation
Provides API to register wordpress hooks and actions using PHP8 Attributes and reflection API
- Host: GitHub
- URL: https://github.com/crtl/wp-plugin-base
- Owner: crtl
- Created: 2023-12-16T13:41:26.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-01-23T13:54:34.000Z (10 months ago)
- Last Synced: 2024-11-12T17:51:21.248Z (5 days ago)
- Language: PHP
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# WordPress Plugin Base
Provides base class word plugins (and themes) to register hooks and actions using PHPs reflection API and PHP8 attributes.
## Requirements
- PHP >= 8.1
## Installation
```
composer require crtl/wp-plugin-base
```## Usage
```php
`WPFilter`, `WPAction` attributes can also ba used to set optional priority and args count for actions and filters respectively.
> ```php
> #[WPAction(priority: 10)]
> public function action_my_action() {}
> ```