'1', 'footer_template' => 'Footer1' ); // Mock class for template rendering class MockFooterBase { public $aiautotool_footer_settings; public function __construct($settings) { $this->aiautotool_footer_settings = $settings; } } // Generate preview for each template for ($i = 1; $i <= 7; $i++) { $template_file = $template_dir . 'template-' . $i . '.php'; if (!file_exists($template_file)) { echo "Template $i not found: $template_file\n"; continue; } $mock = new MockFooterBase($mock_settings); // Capture template output ob_start(); include $template_file; $template_output = ob_get_clean(); // Create preview HTML $preview_html = << Footer Template $i Preview
Footer Template $i - Preview
$template_output
HTML; // Save preview HTML $preview_file = $preview_dir . 'preview-' . $i . '.html'; file_put_contents($preview_file, $preview_html); echo "Generated preview for Template $i: $preview_file\n"; } echo "\nAll previews generated successfully!\n"; echo "You can now:\n"; echo "1. Open the HTML files in a browser\n"; echo "2. Take screenshots of each preview\n"; echo "3. Save them as footer1.png, footer2.png, etc. in the images/footer/ directory\n"; ?>