Skip to content

Commit a32cc9b

Browse files
committed
fix: checking for plugin using class_exists didn't work with bedrock
1 parent eb3c355 commit a32cc9b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stubs/activate-ymir-plugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
22

33
function ymir_activate_plugin() {
4-
if (class_exists('\\Ymir\\Plugin\\Plugin') || (defined('WP_INSTALLING') && WP_INSTALLING)) {
4+
global $ymir;
5+
6+
if (($ymir instanceof \Ymir\Plugin\Plugin && $ymir->isLoaded()) || (defined('WP_INSTALLING') && WP_INSTALLING)) {
57
return;
68
} elseif (!function_exists('get_plugins')) {
79
require_once ABSPATH.'wp-admin/includes/plugin.php';

0 commit comments

Comments
 (0)