// Inline the small existing theme stylesheet in place, preserving cascade order.
// Only the custom homepage is affected; future imports or assets fall back safely.
function yutori_home_inline_theme_style($tag, $handle, $href, $media) {
if ($handle !== 'FWP_styles' || is_admin() || !is_front_page() || !is_page(589) || is_preview()) return $tag;
if (get_stylesheet() !== 'frontis' || strtok($href, '?') !== get_stylesheet_uri()) return $tag;
$content = (string) get_post_field('post_content', 589);
if (strpos($content, 'prematriculaForm') === false) return $tag;
$path = get_stylesheet_directory() . '/style.css';
if (!is_readable($path) || filesize($path) > 32768) return $tag;
$css = file_get_contents($path);
if (!$css || preg_match('/@import|url\s*\(|<\/style/i', $css)) return $tag;
return '' . "\n";
}
add_filter('style_loader_tag', 'yutori_home_inline_theme_style', 20, 4);
wp_script_add_data($handle, 'strategy', 'defer');
}
}
// Keep theme CSS, Site Kit and all custom form/payment/analytics code.
}
add_action('wp_enqueue_scripts', 'yutori_home_performance_assets', 999);
add_action('wp_print_footer_scripts', 'yutori_home_performance_assets', 1);
// Discover the authored responsive hero preload before theme scripts and styles.
function yutori_home_hero_preload() {
if (is_admin() || !is_front_page() || !is_page(589) || is_preview()) return;
$content = (string) get_post_field('post_content', 589);
if (preg_match('/]+>/', $content, $match)) {
echo $match[0];
}
}
add_action('wp_head', 'yutori_home_hero_preload', 2);
https://institutoyutori.com/page-sitemap.xml
2026-10-22T18:01:48+00:00