themeplate/enforcer

按环境类型简单插件执行器

v1.0.0 2022-05-22 15:58 UTC

This package is auto-updated.

Last update: 2024-09-23 06:41:20 UTC


README

用法

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' ) );