<?php
 namespace LingoWP\Shared; class PhpTemplateRenderer { public static function render(string $template, array $data = []): void { $file = LINGOWP_DIR . 'templates/' . ltrim($template, '/'); if (!is_readable($file)) { if (defined('WP_DEBUG') && WP_DEBUG) { trigger_error( sprintf('LingoWP template not found: %s', esc_html($template)), E_USER_WARNING ); } return; } extract($data, EXTR_SKIP); require $file; } } 