From 0585cbf2e538cfef4ffcd4de4f30f9873bc9b4a7 Mon Sep 17 00:00:00 2001 From: amartya-dev Date: Thu, 8 Feb 2024 18:06:01 +0530 Subject: [PATCH] response change to include generated images per page --- includes/SiteGen/SiteGen.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/SiteGen/SiteGen.php b/includes/SiteGen/SiteGen.php index fa6920f..a331122 100644 --- a/includes/SiteGen/SiteGen.php +++ b/includes/SiteGen/SiteGen.php @@ -454,7 +454,11 @@ public static function get_home_pages( $site_description, $content_style, $targe if ( in_array( $pattern_category, $categories_to_separate, true ) ) { $homepage_patterns[ $pattern_category ] = $random_pattern; } else { - $homepage_patterns['content'] = $homepage_patterns['content'] . $random_pattern; + $homepage_patterns['content'] = $homepage_patterns['content'] . $random_pattern['']; + } + + if ( ! empty( $random_pattern['dalleImages'] ) ) { + $homepage_patterns['generatedImages'] = $random_pattern['dalleImages']; } } $generated_homepages[ $slug ] = $homepage_patterns;