311]; } public static function get_header_theme_config(): array { return []; } public static function background_css(string $key): string { return ''; } } } namespace Jio\Core { final class PostMetaBox { public static array $meta = []; public static function get_meta_value(int $id, string $key, $default = '') { return self::$meta[$key] ?? $default; } } } namespace { define('ABSPATH', dirname(__DIR__, 2) . DIRECTORY_SEPARATOR); set_error_handler(static function (int $severity, string $message, string $file, int $line): bool { if (!(error_reporting() & $severity)) return false; throw new \ErrorException($message, 0, $severity, $file, $line); }); function __($text, $domain = ''): string { return (string) $text; } function esc_html($text): string { return htmlspecialchars((string) $text, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); } function esc_attr($text): string { return esc_html($text); } function esc_url($url): string { return esc_attr($url); } function esc_url_raw($url): string { return (string) $url; } function sanitize_key($value): string { return preg_replace('/[^a-z0-9_-]/', '', strtolower((string) $value)); } function wp_kses_post($html): string { return (string) $html; } function strip_shortcodes($content): string { return (string) $content; } function wp_strip_all_tags($content): string { return strip_tags((string) $content); } function get_post_thumbnail_id($id): int { return $GLOBALS['featured_id']; } function attachment_url_to_postid($url): int { return 0; } function wp_get_attachment_image_url($id, $size) { return $id === 42 ? 'https://example.test/featured-' . $size . '.jpg' : false; } function get_post_field($field, $id, $context = ''): string { return $GLOBALS['post_content']; } function get_the_category($id): array { return []; } function get_post_format($id = null) { return false; } function jio_get_lazy_thumb($size = ''): string { return 'https://example.test/placeholder.svg'; } function jio_is_lazy($key): bool { return $key === 'lazy_sider'; } function jio_get_lazy_attr($key, $src, $class = ''): string { if (jio_is_lazy($key)) { return ' class="lazyload ' . esc_attr($class) . '" src="' . jio_get_lazy_thumb() . '" data-src="' . esc_url($src) . '"'; } return ' class="' . esc_attr($class) . '" src="' . esc_url($src) . '"'; } require ABSPATH . 'src/Settings/PostDisplay.php'; require ABSPATH . 'src/Frontend/InlineStyleBuilder.php'; require ABSPATH . 'inc/helpers/posts-renderer/config.php'; require ABSPATH . 'inc/helpers/posts-renderer/post-data.php'; $styles = []; foreach (['defaults' => [], 'custom' => ['list_list_option' => ['scale' => 100], 'list_card_option' => ['scale' => 56]], 'bounds' => ['list_list_option' => ['scale' => 1], 'list_card_option' => ['scale' => 900]]] as $name => $values) { \Jio\Settings\Settings::$values = $values; ob_start(); (new \Jio\Frontend\InlineStyleBuilder())->output(); $styles[$name] = (string) ob_get_clean(); } $GLOBALS['featured_id'] = 42; $GLOBALS['post_content'] = '
