Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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() {}
> ```