47 lines
1.4 KiB
PHP
47 lines
1.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Boilerplate Plugin
|
|
*
|
|
* @package BoilerplatePlugin
|
|
* @author
|
|
* @copyright
|
|
* @license
|
|
*
|
|
* @wordpress-plugin
|
|
* Plugin Name: Boilerplate Plugin
|
|
* Description: Your plugin description.
|
|
* License: GPL v2
|
|
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
|
* Plugin URI: https://domain.com
|
|
* Update URI: https://example.com/my-plugin/
|
|
* Version: 1.0.0
|
|
* Requires at least: 5.2
|
|
* Requires PHP: 7.2
|
|
* Author: Plugin Author
|
|
* Author URI: https://plugin-author.com
|
|
* 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';
|
|
}
|
|
|
|
$mode = \eftec\bladeone\BladeOne::MODE_AUTO; // Can also be MODE_DEBUG
|
|
$blade = new \eftec\bladeone\BladeOne( __DIR__ . '/templates', __DIR__ . '/cache/blade', $mode );
|
|
|
|
register_activation_hook( __FILE__, array( \PluginNamespace\App::class, 'plugin_activation' ) );
|
|
register_deactivation_hook( __FILE__, array( \PluginNamespace\App::class, 'plugin_deactivation' ) );
|
|
|
|
nmsp_plugin_app()->load_blade( $blade );
|