-
Notifications
You must be signed in to change notification settings - Fork 5
/
plugin.php
64 lines (56 loc) · 1.6 KB
/
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
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
<?php
/**
* Plugin Name: WP React Plugin (DEV)
* Plugin URI: https://github.com/j7-dev/wp-react-plugin
* Description: WP React Plugin is a boilerplate for creating a WordPress plugin with React, Tailwind, TypeScript, React Query v4, SCSS and Vite.
* Version: 4.0.7
* Requires at least: 5.7
* Requires PHP: 8.0
* Author: J7
* Author URI: https://github.com/j7-dev
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wp_react_plugin
* Domain Path: /languages
* Tags: vite, react, tailwind, typescript, react-query, scss, WordPress, WordPress plugin
*/
declare ( strict_types=1 );
namespace J7\WpReactPlugin;
if ( \class_exists( 'J7\WpReactPlugin\Plugin' ) ) {
return;
}
require_once __DIR__ . '/vendor/autoload.php';
/**
* Class Plugin
*/
final class Plugin {
use \J7\WpUtils\Traits\PluginTrait;
use \J7\WpUtils\Traits\SingletonTrait;
/**
* Constructor
*/
public function __construct() {
// $this->required_plugins = array(
// array(
// 'name' => 'WooCommerce',
// 'slug' => 'woocommerce',
// 'required' => true,
// 'version' => '7.6.0',
// ),
// array(
// 'name' => 'WP Toolkit',
// 'slug' => 'wp-toolkit',
// 'source' => 'Author URL/wp-toolkit/releases/latest/download/wp-toolkit.zip',
// 'required' => true,
// ),
// );
$this->init(
[
'app_name' => 'My App',
'github_repo' => 'https://github.com/j7-dev/wp-react-plugin',
'callback' => [ Bootstrap::class, 'instance' ],
]
);
}
}
Plugin::instance();