-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdws-plugin-template.php
More file actions
53 lines (46 loc) · 1.72 KB
/
dws-plugin-template.php
File metadata and controls
53 lines (46 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php declare( strict_types=1 );
/**
* Plugin Name: DWS Plugin Template
* Plugin URI: https://github.com/ahegyes/wordpress-plugin-template
* Description: Starting point for WordPress plugins built on the DWS framework.
* Version: 2.0.0
* Requires PHP: 8.5
* Requires at least: 7.0
* Author: Contributors
* Author URI: https://github.com/ahegyes
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: dws-plugin-template
* Domain Path: /languages
*
* @since 2.0.0
* @version 2.0.0
*
* @package DeepWebSolutions\PluginTemplate
*/
defined( 'ABSPATH' ) || exit;
if ( ! is_file( __DIR__ . '/vendor/autoload.php' ) ) {
return;
}
if ( ! defined( 'DWS_PLUGIN_TEMPLATE_FILE' ) ) {
define( 'DWS_PLUGIN_TEMPLATE_FILE', __FILE__ );
}
if ( ! defined( 'DWS_PLUGIN_TEMPLATE_VERSION' ) ) {
define( 'DWS_PLUGIN_TEMPLATE_VERSION', '2.0.0' );
}
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/functions.php';
$dws_plugin_template_requirements = \DeepWebSolutions\PluginTemplate\Scoped\DeepWebSolutions\Framework\Bootstrap\check_requirements(
plugin_basename( __FILE__ )
);
if ( true !== $dws_plugin_template_requirements ) {
\DeepWebSolutions\PluginTemplate\Scoped\DeepWebSolutions\Framework\Bootstrap\output_requirements_error(
plugin_basename( __FILE__ ),
$dws_plugin_template_requirements
);
return;
}
unset( $dws_plugin_template_requirements );
add_action( 'plugins_loaded', 'dws_plugin_template_boot', 15 );
register_activation_hook( DWS_PLUGIN_TEMPLATE_FILE, 'dws_plugin_template_activate' );
register_deactivation_hook( DWS_PLUGIN_TEMPLATE_FILE, 'dws_plugin_template_deactivate' );