Skip to content

Commit

Permalink
Merge pull request #19 from newfold-labs/enhance/sitegen-api
Browse files Browse the repository at this point in the history
added new identifier and action hook
  • Loading branch information
abhijitb authored Feb 21, 2024
2 parents c60abd4 + 5dafecc commit f156636
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/SiteGen/SiteGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class SiteGen {
'site_description',
'content_style',
),
'siteconfig' => array(
'site_description',
),

);

/**
Expand Down Expand Up @@ -327,6 +331,9 @@ public static function generate_site_meta( $site_info, $identifier, $skip_cache

self::cache_sitegen_response( $identifier, $parsed_response );

// calling the action hook for the identifiers
do_action( 'newfold/ai/sitemeta-'. strtolower( $identifier ) . ':generated', $parsed_response );

try {
return $parsed_response;
} catch ( \Exception $exception ) {
Expand Down

0 comments on commit f156636

Please sign in to comment.