Skip to content

Commit 42273ea

Browse files
committed
feat: remove required_plugins, require tgmpa/tgm-plugin-activation
1 parent 51a1e3c commit 42273ea

File tree

5 files changed

+70
-3893
lines changed

5 files changed

+70
-3893
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"kucrut/vite-for-wp": "^0.8.0",
2525
"usefulteam/jwt-auth": "^2.1",
2626
"lodash-php/lodash-php": "^0.0.7",
27-
"yahnis-elsts/plugin-update-checker": "^5.3"
27+
"yahnis-elsts/plugin-update-checker": "^5.3",
28+
"tgmpa/tgm-plugin-activation": "^2.6"
2829
},
2930
"require-dev": {
3031
"squizlabs/php_codesniffer": "@stable",

composer.lock

Lines changed: 66 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
namespace J7\WpReactPlugin;
2121

2222
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
23+
use TGM_Plugin_Activation;
2324

2425
if ( ! \class_exists( 'J7\WpReactPlugin\Plugin' ) ) {
2526

@@ -92,7 +93,6 @@ final class Plugin {
9293
* Constructor
9394
*/
9495
public function __construct() {
95-
require_once __DIR__ . '/required_plugins/index.php';
9696
require_once __DIR__ . '/vendor/autoload.php';
9797
require_once __DIR__ . '/inc/utils/index.php';
9898
require_once __DIR__ . '/inc/class/class-bootstrap.php';
@@ -112,7 +112,7 @@ public function __construct() {
112112
* @return void
113113
*/
114114
public function check_required_plugins() {
115-
$instance = call_user_func( array( __NAMESPACE__ . '\TGM_Plugin_Activation', 'get_instance' ) );
115+
$instance = TGM_Plugin_Activation::get_instance();
116116
$is_tgmpa_complete = $instance->is_tgmpa_complete();
117117

118118
if ( $is_tgmpa_complete ) {

0 commit comments

Comments
 (0)