From cc18c5caa469e9099232f2535002e739a89b800e Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Tue, 20 Aug 2024 13:10:04 +0530 Subject: [PATCH] Remove hardcoded capability check --- includes/SiteGen/SiteGen.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/SiteGen/SiteGen.php b/includes/SiteGen/SiteGen.php index 5e9c9f4..3390dfb 100644 --- a/includes/SiteGen/SiteGen.php +++ b/includes/SiteGen/SiteGen.php @@ -57,7 +57,9 @@ class SiteGen { * Function to check capabilities */ private static function check_capabilities() { - return true; + $capability = new SiteCapabilities(); + $sitegen_enabled = $capability->get( 'hasAISiteGen' ); + return $sitegen_enabled; } /**