PHP code example of themeplate / enforcer
1. Go to this page and download the library: Download themeplate/enforcer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
themeplate / enforcer example snippets
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' ) );