https://github.com/dartmoon-io/wordpress-utils
https://github.com/dartmoon-io/wordpress-utils
wordpress wordpress-plugin
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dartmoon-io/wordpress-utils
- Owner: dartmoon-io
- License: mit
- Created: 2023-05-19T13:43:40.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-18T10:01:46.000Z (almost 3 years ago)
- Last Synced: 2025-07-29T22:59:03.689Z (11 months ago)
- Topics: wordpress, wordpress-plugin
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WordPress Utils
A simple utils plugin that lets you register the same handler to multiple filters without much effort.
## Installation
### If you use a Roots Bedrock or a composer-based WordPress installation
```bash
composer require dartmoon/wordpress-utils
```
## If you use a normal WordPress installation
1. Download and install a MU plugin loader that lets you use MU plugins that resides inside folders. For example you could use [Bedrock Autoloader](https://github.com/roots/bedrock-autoloader).
2. [Download the latest release](https://github.com/dartmoon-io/wordpress-utils/releases) of this plugin and extract it inside the mu-plugins folder of your WordPress installation.
## Usage
It behave exactly as `add_filter` with the only exception that the first argument (the filter name) accepts an array instead of a string.
```php
add_filters(['filter1', 'filter2'], function () {
// ...
});
```
## License
This project is licensed under the MIT License - see the LICENSE.md file for details