From 69262443e0f93ba395374c4e68085055d47aaed7 Mon Sep 17 00:00:00 2001 From: Allen Benny <48691514+officiallygod@users.noreply.github.com> Date: Thu, 21 Nov 2024 13:45:45 +0530 Subject: [PATCH 1/3] Update Config.php --- includes/Config.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/includes/Config.php b/includes/Config.php index 554dade..15570c5 100644 --- a/includes/Config.php +++ b/includes/Config.php @@ -36,10 +36,6 @@ public static function get_wp_config_initialization_constants() { * @return boolean */ public static function get_site_capability( $capability ) { - // Only fetch capabilities in the admin when a user is logged in - if ( ! is_admin() || ! is_user_logged_in() ) { - return false; - } $site_capabilities = new SiteCapabilities(); return $site_capabilities->get( $capability ); } From 1378dfc6264d3cc1e41095649a7ec2ae93807d65 Mon Sep 17 00:00:00 2001 From: Allen Benny <48691514+officiallygod@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:08:14 +0530 Subject: [PATCH 2/3] Update SiteGenService.php --- includes/Services/SiteGenService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/Services/SiteGenService.php b/includes/Services/SiteGenService.php index cb018cd..b01842f 100644 --- a/includes/Services/SiteGenService.php +++ b/includes/Services/SiteGenService.php @@ -88,8 +88,7 @@ public static function is_enabled() { if ( ! ( class_exists( 'NewfoldLabs\WP\Module\AI\SiteGen\SiteGen' ) ) ) { return false; } - return isset( Data::current_brand()['config']['enabled_flows']['sitegen'] ) - && true === Data::current_brand()['config']['enabled_flows']['sitegen']; + return true; } From e186f1cfc53ead1d771c5c2f6077709394da516f Mon Sep 17 00:00:00 2001 From: Allen Benny <48691514+officiallygod@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:08:47 +0530 Subject: [PATCH 3/3] Update Config.php --- includes/Config.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/Config.php b/includes/Config.php index 15570c5..554dade 100644 --- a/includes/Config.php +++ b/includes/Config.php @@ -36,6 +36,10 @@ public static function get_wp_config_initialization_constants() { * @return boolean */ public static function get_site_capability( $capability ) { + // Only fetch capabilities in the admin when a user is logged in + if ( ! is_admin() || ! is_user_logged_in() ) { + return false; + } $site_capabilities = new SiteCapabilities(); return $site_capabilities->get( $capability ); }