-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdgwyer.php
88 lines (74 loc) · 1.86 KB
/
dgwyer.php
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Plugin Name: Dgwyer
* Description: Block Editor plugin generated by create-block-plugin – build step required.
* Version: 1.0.0
* Plugin URI: https://wordpress.org/plugins/
* Author: blockhandbook
* Author URI: https://blockhandbook.com/
* Domain Path: /languages
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Tested up to: 5.5
* Requires at least: 5.0
* Requires PHP: 7.0
* Text Domain: dgwyer
*
* @package Dgwyer
*/
namespace Dgwyer;
require __DIR__ . '/vendor/autoload.php';
define( 'DGWYER_PLUGIN_VERSION', '1.0.0' );
define( 'DGWYER_PLUGIN_SLUG', 'dgwyer' );
define( 'DGWYER_PLUGIN_SLUG_SNAKE_CASE', 'dgwyer' );
define( 'DGWYER_PLUGIN_SLUG_CAMEL_CASE', 'dgwyer' );
define( 'DGWYER_PLUGIN_TEXTDOMAIN', 'dgwyer' );
define( 'DGWYER_PLUGIN_FILE', __FILE__ );
define( 'DGWYER_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'DGWYER_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
if ( ! class_exists( 'Plugin' ) ) {
/**
* Plugin Class.
*
* @since 1.0.0
*/
class Plugin {
/**
* Class instance.
*
* @var Plugin
*/
private static $instance = null;
/**
* Theme constructor.
* Called immediately when you instantiate a class.
* Really good article on setting up constructors for WP classes.
* https://carlalexander.ca/designing-class-wordpress-hooks/
*/
private function __construct() {
}
/**
* Return Plugin Instance.
*
* @return object\Plugin
*/
public static function instance() {
if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Load the plugin.
*
* @return void
*/
public static function load() {
// You can find these classes in the includes/ directory.
LoadTranslations::register();
EnqueueAssets::register();
RegisterBlocks::register();
}
}
}
Plugin::load();