A simple utils plugin that lets you register the same handler to multiple filters without much effort.
composer require dartmoon/wordpress-utils
-
Download and install a MU plugin loader that lets you use MU plugins that resides inside folders. For example you could use Bedrock Autoloader.
-
Download the latest release of this plugin and extract it inside the mu-plugins folder of your WordPress installation.
It behave exactly as add_filter
with the only exception that the first argument (the filter name) accepts an array instead of a string.
add_filters(['filter1', 'filter2'], function () {
// ...
});
This project is licensed under the MIT License - see the LICENSE.md file for details