-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathplugin.php
40 lines (30 loc) · 851 Bytes
/
plugin.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
<?php
/**
* Plugin Name: {PLUGIN_NAME}
* Description: Skeleton plugin blocks gutenberg
* Author: Thomas Deneulin
* Author URI: https://essential-dev-skills.com
* Version: {VERSION}
* License: GPL2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once dirname(__FILE__) . "/vendor/autoload.php";
use PluginReplaceGutenberg\PluginReplaceEnqueue;
define("PLUGIN_REPLACE", "{PLUGIN_SLUG}");
define("PLUGIN_REPLACE_VERSION", "{VERSION}");
define("PLUGIN_REPLACE_BASE_FILE", plugin_basename( __FILE__ ));
define("PLUGIN_REPLACE_PATH", plugin_dir_path( __FILE__ ));
define("PLUGIN_REPLACE_URL", plugin_dir_url(__FILE__) );
$actions = array(
new PluginReplaceEnqueue()
);
foreach($actions as $action){
if(!method_exists($action, "hooks")){
continue;
}
$action->hooks();
}