'https://schema.org', '@type' => 'WebSite', 'name' => get_bloginfo('name'), 'url' => get_home_url(), ); if (get_bloginfo('description')) { $schema['description'] = get_bloginfo('description'); } echo "\n" . '' . "\n"; echo '' . "\n"; } add_action('wp_head', 'roi_schema_fallback', 20); /** * Security headers configuration * * Adds recommended security headers that also improve SEO * (by indicating secure, well-maintained site) * * @since 1.0.0 */ function roi_security_headers() { // These headers improve trust signals for search engines header('X-Content-Type-Options: nosniff'); header('X-Frame-Options: SAMEORIGIN'); header('X-XSS-Protection: 1; mode=block'); } add_action('send_headers', 'roi_security_headers'); /** * Ensure title tag support is active * * This is set in functions.php with add_theme_support('title-tag') * but we verify it here to log any issues for debugging. * * @since 1.0.0 */ function roi_verify_title_tag_support() { if (!current_theme_supports('title-tag')) { // Log warning if title-tag support is somehow disabled error_log('Warning: ROI Theme title-tag support not properly initialized'); } } add_action('after_setup_theme', 'roi_verify_title_tag_support', 20);