https://github.com/themeplate/enforcer
Simple enforcer of plugins per environment type
https://github.com/themeplate/enforcer
wordpress wordpress-plugins
Last synced: 3 months ago
JSON representation
Simple enforcer of plugins per environment type
- Host: GitHub
- URL: https://github.com/themeplate/enforcer
- Owner: ThemePlate
- License: gpl-3.0
- Created: 2022-05-14T09:05:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-30T09:37:30.000Z (10 months ago)
- Last Synced: 2025-07-16T16:41:55.751Z (6 months ago)
- Topics: wordpress, wordpress-plugins
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ThemePlate Enforcer
## Usage
```php
use ThemePlate\Enforcer;
$enforcer = new Enforcer();
$enforcer->register( 'local', 'query-monitor/query-monitor.php' );
$enforcer->register( 'production', 'wordfence/wordfence.php' );
// or register all in one go
$plugins = array(
'local' => array(
'query-monitor/query-monitor.php',
),
'production' => array(
'wordfence/wordfence.php',
),
);
$enforcer->load( $plugins );
// set up the hooks
add_action( 'init', array( $enforcer, 'init' ) );
```