-
Notifications
You must be signed in to change notification settings - Fork 1
/
my-super-plugin-name.php
93 lines (69 loc) · 2.33 KB
/
my-super-plugin-name.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
89
90
91
92
93
<?php
/**
* @package MySuperPluginName
*/
/**
* Plugin Name: My super plugin name
* Plugin URI: https://wordpress.org/plugins/my-super-plugin-name/
* Description: my plugin description
* Version: 1.0.0
* Author: Md Saiful Islam
* Author URI: https://knowinforms.com
* Text Domain: sstd
* Requires at least: 6.2
* Requires PHP: 7.4
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Update URI: https://github.com/mm-saiful6854
*/
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Copyright 2005-2015 Automattic, Inc.
*/
// If this file is called directly, abort!!!
defined('ABSPATH') or die('Hey, you can not access this file, you silly human!');
// Define CONSTANTS
define('PLUGIN_PATH', plugin_dir_path(__FILE__));
define('PLUGIN_URL', plugin_dir_url(__FILE__));
define('PLUGIN', plugin_basename(__FILE__));
// import other classes
require_once PLUGIN_PATH . 'inc/Init.php';
require_once PLUGIN_PATH . 'inc/Base/Activate.php';
require_once PLUGIN_PATH . 'inc/Base/Deactivate.php';
// activation
register_activation_hook(__FILE__, array('Activate', 'activate'));
// deactivation
register_deactivation_hook(__FILE__, array('Deactivate', 'deactivate'));
/**
* Initialize all the core classes of the plugin
*/
if (class_exists('Init')) {
Init::register_services();
}
// if (class_exists('SuperPlugin')) {
// class SuperPlugin
// {
// protected function create_post_type()
// {
// add_action('init', array($this, 'custom_post_type'));
// }
// function custom_post_type()
// {
// register_post_type('book', ['public' => true, 'label' => 'Books']);
// }
// function activate()
// {
// Activate::activate();
// }
// }
// }