diff --git a/includes/Services/SiteGenService.php b/includes/Services/SiteGenService.php new file mode 100644 index 0000000..9b85c79 --- /dev/null +++ b/includes/Services/SiteGenService.php @@ -0,0 +1,65 @@ + true, + 'targetaudience' => true, + 'contenttones' => true, + 'contentstructure' => true, + 'colorpalette' => true, + 'sitemap' => true, + 'pluginrecommendation' => true, + 'fontpair' => true, + 'keywords' => true, + ); + + return isset( $identifiers[ $key ] ); + } + + /** + * Checks if the site is eligible for SiteGen Capabilities. + * + * @return boolean + */ + 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']; + } + + + /** + * Sends the data required for SiteGen Generation + * + * @param string|Object $site_info The prompt that configures the Site gen object. + * @param string $identifier The identifier for Generating Site Meta. + * @param boolean $skip_cache To override the cache and fetch the data. + * @return array + */ + public static function instantiate_site_meta( $site_info, $identifier, $skip_cache ) { + + // SiteGen::generate_sitegen_meta( $site_info, $identifier, $skip_cache ); + return array(); + } + +}