37 lines
1.0 KiB
PHP
37 lines
1.0 KiB
PHP
<?php
|
|
|
|
use PluginNamespace\App;
|
|
use eftec\bladeone\BladeOne;
|
|
|
|
/*
|
|
Plugin Name: Boilerplate Plugin
|
|
Plugin URI: https://domain.com
|
|
Description: Your plugin description
|
|
Version: 1.0.0
|
|
Author: Plugin Author
|
|
Author URI: https://plugin-author.com
|
|
License: GPL v2
|
|
Text Domain: nmsp-plugin-name-text-domain
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit; // Exit if accessed directly
|
|
}
|
|
|
|
define( 'NMSP_PLUGIN_BASE_DIR', __DIR__ );
|
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
require_once __DIR__ . '/bootstrap.php';
|
|
|
|
// include the CLI utility of this plugin if WordPress has CLI functionality
|
|
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
|
require_once __DIR__ . '/includes/class-nmspcli.php';
|
|
}
|
|
|
|
$blade = new BladeOne( __DIR__ . '/templates', __DIR__ . '/cache/blade', BladeOne::MODE_DEBUG ); // BladeOne::MODE_AUTO
|
|
|
|
register_activation_hook( __FILE__, array( App::class, 'plugin_activation' ) );
|
|
register_deactivation_hook( __FILE__, array( App::class, 'plugin_deactivation') );
|
|
|
|
nmsp_plugin_app()->load_blade( $blade );
|