Moving admin to it's own directory, trying to fix up docblocks and stuff
This commit is contained in:
@ -1,21 +1,30 @@
|
||||
<?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
|
||||
*/
|
||||
/**
|
||||
* 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
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
define( 'NMSP_PLUGIN_BASE_DIR', __DIR__ );
|
||||
@ -25,12 +34,13 @@ 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';
|
||||
require_once __DIR__ . '/includes/class-nmspcli.php';
|
||||
}
|
||||
|
||||
$blade = new BladeOne( __DIR__ . '/templates', __DIR__ . '/cache/blade', BladeOne::MODE_DEBUG ); // BladeOne::MODE_AUTO
|
||||
$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( App::class, 'plugin_activation' ) );
|
||||
register_deactivation_hook( __FILE__, array( App::class, 'plugin_deactivation') );
|
||||
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 );
|
||||
|
Reference in New Issue
Block a user