diff --git a/lib/fewbricks.php b/lib/fewbricks.php index b9e1778..1be00d8 100644 --- a/lib/fewbricks.php +++ b/lib/fewbricks.php @@ -47,7 +47,16 @@ public static function construct() } - } else { + } else if ( defined( 'WP_CLI' ) && WP_CLI ) { + //added in case something goes wrong and we need to deactivate the plugin from WP CLI! + if( self::acf_exists() && + self::fewbricks_hidden_exists() && + self::fewbricks_template_dir_exists()) + { + self::add_fewbricks_hidden_activated_check(); + self::init(); + } + } else { // Not in admin system, so assume that all is good. self::init(); @@ -351,4 +360,4 @@ private static function init_messages() } -} \ No newline at end of file +}