<?php /** * Plugin Name: RHL V48 行业洞察增强 * Description: 1) /insights/ 底部V41同款文章列表(无限量) 2) 文章详情页背景风格与全站统一 * Version: 48.3 * Author: RHL AI Assistant */ if ( ! defined( 'ABSPATH' ) ) exit; /* ========================================================================== 一、文章详情页 — 注入CSS覆盖Kadence亮色样式,匹配V41暗色宽屏风格 ========================================================================== */ add_action( 'wp_head', 'rhl_v48_single_post_style', 20 ); function rhl_v48_single_post_style() { if ( ! is_single() && ! is_singular('post') ) return; echo '<style id="rhl-v48-post-fix"> /* === 博客文章页暗色风格 === */ body.single-post #masthead,body.single-post .site-branding,body.single-post .site-title-wrap,body.single-post .site-title{display:none!important} body.single-post .post-thumbnail{display:none!important} body.single-post{background:radial-gradient(circle at 15% 18%,rgba(0,210,255,.18),transparent 28%),radial-gradient(circle at 88% 12%,rgba(255,85,77,.10),transparent 26%),linear-gradient(120deg,#052536 0%,#07172d 45%,#070714 100%)!important} body.single-post #inner-wrap,body.single-post #main-wrap,body.single-post .site,body.single-post .content-area,body.single-post .site-content,body.single-post .entry-content-wrap,body.single-post .content-bg{background:transparent!important;box-shadow:none!important} body.single-post .entry.single-entry{background:transparent!important;box-shadow:none!important;border-radius:0!important} body.single-post .entry-content-wrap{background:transparent!important;padding:32px 40px 24px!important;border:none!important;border-radius:0!important;box-shadow:none!important} body.single-post .content-container,body.single-post .site-container{max-width:900px!important;padding-left:24px!important;padding-right:24px!important;margin-left:auto!important;margin-right:auto!important} body.single-post .content-area{margin-top:24px!important;margin-bottom:48px!important} body.single-post .entry-hero.post-hero-section{background:transparent!important} body.single-post .entry-hero .entry-header{min-height:auto!important;padding:32px 40px 24px!important} /* 隐藏Kadence footer */ body.single-post .site-footer,body.single-post #colophon{display:none!important} /* 文字颜色 */ body.single-post .entry-title{display:block!important;font-size:2.2rem!important;color:rgba(255,255,255,.95)!important;font-size:2rem!important;font-weight:700!important;margin-bottom:.3em!important} body.single-post .entry-meta,body.single-post .entry-meta a,body.single-post .posted-by,body.single-post .posted-on{color:rgba(255,255,255,.45)!important} body.single-post .entry-content,body.single-post .entry-content p,body.single-post .entry-content li{color:rgba(255,255,255,.75)!important;line-height:1.85!important} body.single-post .entry-content h2{color:rgba(255,255,255,.95)!important;font-size:1.5rem!important;margin-top:2em!important;border-bottom:1px solid rgba(40,229,255,.15)!important;padding-bottom:.5em!important} body.single-post .entry-content h3{color:rgba(255,255,255,.88)!important;font-size:1.2rem!important;margin-top:1.5em!important} body.single-post .entry-content strong{color:rgba(255,255,255,.92)!important} body.single-post .entry-content a{color:#28e5ff!important;text-decoration:none!important} body.single-post .entry-content a:hover{color:#b97c3b!important} body.single-post .entry-content table{border-collapse:collapse;width:100%} body.single-post .entry-content th{background:rgba(40,229,255,.1)!important;color:rgba(255,255,255,.92)!important;padding:12px 16px!important;border:1px solid rgba(40,229,255,.15)!important} body.single-post .entry-content td{padding:12px 16px!important;border:1px solid rgba(255,255,255,.08)!important;color:rgba(255,255,255,.75)!important;background:rgba(255,255,255,.02)!important} body.single-post .wp-block-button__link{background:linear-gradient(135deg,#b97c3b,#d4944a)!important;color:#fff!important;padding:14px 28px!important;border-radius:8px!important;font-weight:600!important;border:none!important} body.single-post .kadence-breadcrumbs,body.single-post .kadence-breadcrumbs a{color:rgba(255,255,255,.4)!important} body.single-post .post-navigation,body.single-post .post-navigation a{color:rgba(255,255,255,.6)!important} </style>'; } /* ========================================================================== 二、/insights/ 底部 — V41同款文章列表,不限数量,仅显示标题+日期 ========================================================================== */ add_filter( 'the_content', 'rhl_v48_insights_posts', 99 ); function rhl_v48_insights_posts( $content ) { if ( ! is_page( 'insights' ) ) return $content; $all_posts = get_posts(array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'DESC', )); if ( empty( $all_posts ) ) return $content; // 分隔线 $html = '<hr style="border:0;border-top:1px solid rgba(40,229,255,.12);margin:56px 0 28px">'; foreach ( $all_posts as $p ) { $t = esc_html( get_the_title( $p ) ); $l = esc_url( get_permalink( $p ) ); $d = get_the_date( 'Y-m-d', $p ); // V41 rhl-v41-article-card 标准结构,无摘要 $html .= '<a class="rhl-v41-article-card" href="' . $l . '">'; $html .= '<div>'; $html .= '<h3>' . $t . '</h3>'; $html .= '<p>' . $d . '</p>'; $html .= '</div>'; $html .= '</a>'; } return $content . $html; } // ========== RHL SEO增强: OG/Twitter/Schema (2026-06-14) ========== if (!function_exists('rhl_seo_add_head_meta')) { function rhl_seo_add_head_meta() { $og_image = 'https://ruihuali.com.cn/wp-content/uploads/rhl-assets/rhl-header-logo-v44.png'; ?> <!-- RHL SEO Enhancement --> <meta property="og:image" content="<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_url($og_image); ?>" /> <meta property="og:image:width" content="1200" /> <meta property="og:image:height" content="630" /> <meta property="og:locale" content="zh_CN" /> <meta property="og:site_name" content="瑞华丽科技" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:image" content="<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_url($og_image); ?>" /> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } // SEO meta description $rhl_desc = ''; if (is_front_page() || is_home()) { $rhl_desc = '瑞华丽科技,深圳惠州东莞三地政府备案数字化转型服务商,专注国产PLM/PDM系统、SOLIDWORKS集成、CAD/CAE/MES/ERP工业软件选型,提供免费数字化诊断、政策补贴申报(最高80%)、AI智能图纸搜索。200+制造业企业选择,15年+行业经验。电话18565807954。'; } elseif (is_single()) { $rhl_desc = mb_substr(wp_strip_all_tags(get_the_excerpt() ?: get_the_content()), 0, 160); if (empty($rhl_desc)) $rhl_desc = get_the_title() . ' - 瑞华丽科技工业软件数字化转型深度解读。'; } elseif (is_page()) { $rhl_desc = mb_substr(wp_strip_all_tags(get_the_content()), 0, 160); if (empty($rhl_desc)) $rhl_desc = get_the_title() . ' - 瑞华丽科技工业软件数字化转型服务。'; } else { $rhl_desc = '瑞华丽科技 — 国产PLM/PDM工业软件数字化转型服务商,深圳·惠州·东莞。'; } if (!empty($rhl_desc)) { echo '<meta name="description" content="' . esc_attr($rhl_desc) . '" />' . " "; echo '<meta property="og:title" content="' . esc_attr(wp_get_document_title()) . '" />' . " "; echo '<meta property="og:description" content="' . esc_attr($rhl_desc) . '" />' . " "; } // robots meta echo '<meta name="robots" content="index, follow, max-image-preview:large" /> <meta name="sogou_site_verification" content="vJsQkFr3Pn" /> <meta name="360-site-verification" content="7c4196a652b9c732e92b258fc86a99b9" />' . " "; ?> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } if (is_single()) { echo '<meta property="og:type" content="article" />' . " "; echo '<meta property="article:published_time" content="' . esc_attr(get_the_date('c')) . '" />' . " "; } if (is_front_page() || is_home()) { ?> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"WebSite","name":"<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_js(get_bloginfo('name')); ?>","url":"<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_url(home_url()); ?>","potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_url(home_url('/?s={search_term_string}')); ?>"},"query-input":"required name=search_term_string"}} </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } if (!is_front_page() && !is_home()) { $items = array(array('@type' => 'ListItem', 'position' => 1, 'name' => '首页', 'item' => home_url())); $pos = 2; if (is_single()) { $cats = get_the_category(); if (!empty($cats)) { $items[] = array('@type' => 'ListItem', 'position' => $pos, 'name' => $cats[0]->name, 'item' => get_category_link($cats[0]->term_id)); $pos++; } $items[] = array('@type' => 'ListItem', 'position' => $pos, 'name' => get_the_title()); } elseif (is_page()) { $items[] = array('@type' => 'ListItem', 'position' => $pos, 'name' => get_the_title()); } ?> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo json_encode($items, JSON_UNESCAPED_UNICODE); ?>} </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } if (is_single()) { $author_name = get_the_author_meta('display_name') ?: '瑞华丽(深圳)科技有限公司'; ?> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"Article","headline":"<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_js(get_the_title()); ?>","author":{"@type":"Person","name":"<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_js($author_name); ?>"},"publisher":{"@type":"Organization","name":"瑞华丽(深圳)科技有限公司","logo":{"@type":"ImageObject","url":"https://ruihuali.com.cn/wp-content/uploads/rhl-assets/rhl-header-logo-v44.png"}},"datePublished":"<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_js(get_the_date('c')); ?>","dateModified":"<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_js(get_the_modified_date('c')); ?>","mainEntityOfPage":{"@type":"WebPage","@id":"<?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo esc_url(get_permalink()); ?>"}} </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } } add_action('wp_head', 'rhl_seo_add_head_meta', 5); } // ========== END SEO Enhancement ========== // ========== RHL 品牌专业度增强: 信任条 + 全站CTA (2026-06-15) ========== if (!function_exists('rhl_v48_brand_trust_styles')) { function rhl_v48_brand_trust_styles() { ?> <style id="rhl-v48-brand-trust"> #rhl-trust-bar{max-width:1680px;margin:0 auto;padding:10px 6vw;display:flex;align-items:center;justify-content:center;gap:24px;flex-wrap:wrap;background:rgba(7,23,45,0.92);border-bottom:1px solid rgba(40,229,255,.12);font-size:14px;color:rgba(255,255,255,.65)} #rhl-trust-bar .rhl-trust-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 14px;border:1px solid rgba(40,229,255,.28);border-radius:999px;background:rgba(40,229,255,.1);color:#d8fbff;font-weight:700;font-size:13px} #rhl-trust-bar a{color:#28e5ff;text-decoration:none} #rhl-trust-bar a:hover{color:#b97c3b} #rhl-footer-cta{max-width:1680px;margin:60px auto 0;padding:48px 6vw;background:linear-gradient(135deg,rgba(40,229,255,.06) 0%,rgba(22,141,255,.04) 100%);border-top:1px solid rgba(40,229,255,.12);border-bottom:1px solid rgba(40,229,255,.08);text-align:center} #rhl-footer-cta .rhl-cta-title{font-size:22px;font-weight:700;color:rgba(255,255,255,.92);margin-bottom:8px} #rhl-footer-cta .rhl-cta-sub{font-size:15px;color:rgba(255,255,255,.5);margin-bottom:28px} #rhl-footer-cta .rhl-cta-row{display:flex;align-items:center;justify-content:center;gap:32px;flex-wrap:wrap} #rhl-footer-cta .rhl-cta-item{color:rgba(255,255,255,.7);font-size:16px} #rhl-footer-cta .rhl-cta-item strong{color:#28e5ff;font-size:18px} #rhl-footer-cta .rhl-cta-btn{display:inline-block;padding:14px 36px;background:linear-gradient(135deg,#b97c3b,#d4944a);color:#fff!important;font-weight:700;font-size:16px;border-radius:8px;text-decoration:none;transition:transform .2s,box-shadow .2s;box-shadow:0 4px 16px rgba(185,124,59,.3)} #rhl-footer-cta .rhl-cta-btn:hover{transform:translateY(-2px);box-shadow:0 6px 24px rgba(185,124,59,.45)} @media(max-width:768px){#rhl-trust-bar{font-size:12px;gap:12px;padding:8px 16px}#rhl-footer-cta{padding:32px 16px}#rhl-footer-cta .rhl-cta-row{gap:16px}} </style> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_head', 'rhl_v48_brand_trust_styles', 15); } if (!function_exists('rhl_v48_trust_bar_html')) { function rhl_v48_trust_bar_html() { if (!is_front_page() && !is_home()) return; ?> <div id="rhl-trust-bar"> <span class="rhl-trust-badge">粤ICP备2026067467号-1</span> <span>深圳·惠州·东莞 三地政府备案数字化转型服务商</span> <span>200+制造业企业信赖选择</span> <a href="tel:18565807954">18565807954</a> </div> <script> (function(){var b=document.getElementById("rhl-trust-bar");var h=document.querySelector(".rhl-v41-site-header");if(b&&h){h.insertAdjacentElement("afterend",b)}})(); </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_footer', 'rhl_v48_trust_bar_html', 10); } if (!function_exists('rhl_v48_footer_cta_html')) { function rhl_v48_footer_cta_html() { ?> <div id="rhl-footer-cta"> <div class="rhl-cta-title">让数字化转型更简单</div> <div class="rhl-cta-sub">15年+工业软件行业经验和政策补贴行业经验,免费为您提供专业诊断与方案咨询</div> <div class="rhl-cta-row"> <span class="rhl-cta-item">电话:<strong>18565807954</strong></span> <span class="rhl-cta-item">邮箱:<strong>sales@ruihuali.com.cn</strong></span> <a class="rhl-cta-btn" href="/contact/">免费诊断咨询</a> </div> </div> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_footer', 'rhl_v48_footer_cta_html', 10); } // ========== END 品牌专业度增强 ========== // ========== RHL Phase A: 全站视觉统一修复 (2026-06-15) ========== if (!function_exists('rhl_v48_phase_a_fixes')) { function rhl_v48_phase_a_fixes() { ?> <style id="rhl-v48-phase-a"> /* 首页body暗色+CTA实色底 */ body.home{background:radial-gradient(circle at 15% 18%,rgba(0,210,255,.20),transparent 28%),radial-gradient(circle at 88% 12%,rgba(255,85,77,.12),transparent 26%),linear-gradient(120deg,#052536 0%,#07172d 45%,#070714 100%)!important} body.home #rhl-footer-cta{background:rgba(4,8,20,.92)!important;border-top:1px solid rgba(40,229,255,.15)!important;border-bottom:1px solid rgba(40,229,255,.1)!important} body:not(.home):not(.single-post){background:radial-gradient(circle at 15% 18%,rgba(0,210,255,.20),transparent 28%),radial-gradient(circle at 88% 12%,rgba(255,85,77,.12),transparent 26%),linear-gradient(120deg,#052536 0%,#07172d 45%,#070714 100%)!important} body:not(.home):not(.single-post) #inner-wrap,body:not(.home):not(.single-post) .content-area,body:not(.home):not(.single-post) .site-container,body:not(.home):not(.single-post) .entry-content-wrap,body:not(.home):not(.single-post) .content-bg{background:transparent!important;box-shadow:none!important} body:not(.home):not(.single-post) .entry-content,body:not(.home):not(.single-post) .entry-content p,body:not(.home):not(.single-post) .entry-content li{color:rgba(255,255,255,.75)!important} body:not(.home):not(.single-post) h1,body:not(.home):not(.single-post) h2,body:not(.home):not(.single-post) h3{color:rgba(255,255,255,.92)!important} body:not(.home):not(.single-post) .entry-title{color:rgba(255,255,255,.95)!important} body.page-id-838{background:radial-gradient(circle at 15% 18%,rgba(0,210,255,.18),transparent 28%),radial-gradient(circle at 88% 12%,rgba(255,85,77,.10),transparent 26%),linear-gradient(120deg,#052536 0%,#07172d 45%,#070714 100%)!important} body.page-id-838 .entry-content a{color:#28e5ff!important} body.page-id-838 .wp-block-button__link{background:linear-gradient(135deg,#b97c3b,#d4944a)!important;color:#fff!important;font-weight:700!important;border:none!important} body.page-id-848 .entry-title{display:none!important} body.single-post .content-container,body.single-post .site-container{max-width:1280px!important;padding-left:24px!important;padding-right:24px!important;margin-left:auto!important;margin-right:auto!important} body.single-post .entry-content{max-width:960px!important;margin:0 auto!important} body.single-post .site-branding{display:none!important} body.single-post .site-footer,body.single-post #colophon{display:none!important} body.single-post .rhl-v41-footer{display:block!important} body.single-post .entry-content-wrap{max-width:1020px!important;margin:0 auto!important;padding:32px 24px!important} body.single-post .content-container,body.single-post .site-container{max-width:1080px!important;padding-left:0!important;padding-right:0!important} body.single-post .content-area{margin-top:1.5rem!important;margin-bottom:3rem!important} body.single-post .entry.single-entry{background:rgba(255,255,255,.02)!important;border-radius:14px!important;border:1px solid rgba(40,229,255,.06)!important} body.single-post .entry-content table{width:100%!important} </style> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_head', 'rhl_v48_phase_a_fixes', 12); } // ========== END Phase A 视觉统一修复 ========== // ========== RHL Phase B: CSS变量体系 + 导航可持续 + 断点统一 + 盒装风格 (2026-06-15) ========== // B2: 导航数据 — 集中管理,增删改只需编辑此数组 if (!function_exists('rhl_v48_nav_data')) { function rhl_v48_nav_data() { $nav = [ ['url' => '/', 'label' => '首页'], ['url' => '/solutions/', 'label' => '解决方案'], ['url' => '/products/', 'label' => '产品体系'], ['url' => '/policy-service/', 'label' => '政策服务'], ['url' => '/insights/', 'label' => '行业洞察'], ['url' => '/cases/', 'label' => '客户案例'], ['url' => '/about/', 'label' => '关于我们'], ['url' => '/contact/', 'label' => '联系我们'], ]; ?> <script type="application/json" id="rhl-nav-data"><?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo json_encode($nav, JSON_UNESCAPED_UNICODE); ?></script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_head', 'rhl_v48_nav_data', 8); } // B2: 导航运行时渲染 — 读取JSON数据动态构建导航链接 if (!function_exists('rhl_v48_nav_render_js')) { function rhl_v48_nav_render_js() { ?> <script> (function(){ var dataEl = document.getElementById('rhl-nav-data'); if (!dataEl) return; try { var navItems = JSON.parse(dataEl.textContent); var navs = document.querySelectorAll('.rhl-v41-nav'); if (navs.length === 0) { // Tier 2 fallback: Kadence primary menu navs = document.querySelectorAll('.primary-menu-container ul'); } if (navs.length === 0) { // Last fallback: any nav in the header navs = document.querySelectorAll('#masthead nav ul, .rhl-v41-site-header nav ul'); } navs.forEach(function(nav) { var html = ''; navItems.forEach(function(item) { html += '<a href="' + item.url + '">' + item.label + '</a>'; }); nav.innerHTML = html; }); } catch(e) {} })(); </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_footer', 'rhl_v48_nav_render_js', 5); } // B1+B4+B5: CSS变量体系 + 断点统一 + 暗色盒装风格定义 if (!function_exists('rhl_v48_design_system')) { function rhl_v48_design_system() { ?> <style id="rhl-v48-design-system"> /* ===== B1: 统一CSS变量体系 ===== */ :root { --rhl-cyan: #28e5ff; --rhl-blue: #168dff; --rhl-gold-start: #b97c3b; --rhl-gold-end: #d4944a; --rhl-red: #ff554d; --rhl-bg-deep: #070714; --rhl-bg-mid: #07172d; --rhl-bg-high: #052536; --rhl-text-primary: #eefaff; --rhl-text-secondary: #aabbd4; --rhl-text-muted: #91a4c2; --rhl-border-cyan: rgba(40,229,255,.25); --rhl-border-hover: rgba(40,229,255,.62); --rhl-card-bg: rgba(6,18,42,.68); --rhl-card-bg-hover: rgba(8,28,60,.72); --rhl-radius-sm: 14px; --rhl-radius-md: 24px; --rhl-radius-lg: 28px; --rhl-radius-xl: 30px; --rhl-radius-pill: 999px; --rhl-content-max: 1280px; --rhl-home-max: 1680px; /* 向后兼容旧变量名 */ --rhl30-cyan: var(--rhl-cyan); --rhl30-blue: var(--rhl-blue); --rhl30-deep: var(--rhl-bg-deep); --rhl30-navy: var(--rhl-bg-mid); --rhl30-line: var(--rhl-border-cyan); --rhl30-text: var(--rhl-text-primary); --rhl30-muted: var(--rhl-text-secondary); --rhl30-red: var(--rhl-red); } /* ===== B4: 移动断点统一为768px ===== */ @media (max-width: 768px) and (min-width: 761px) { .rhl-v41-hero { grid-template-columns: 1fr !important; } .rhl-v41-path-grid, .rhl-v41-product-grid { grid-template-columns: repeat(2, 1fr) !important; } .rhl-v41-article-grid, .rhl-v41-decision-grid { grid-template-columns: 1fr !important; } .rhl-v41-site-header { padding: 0 3vw !important; } .rhl-v41-nav { gap: 18px !important; } .rhl-v41-footer-grid { grid-template-columns: repeat(2, 1fr) !important; } } /* ===== B5: 暗色盒装风格 — 博客+专题+未来新文章 ===== */ body.rhl-boxed-dark { background: radial-gradient(circle at 15% 18%, rgba(0,210,255,.20), transparent 28%), radial-gradient(circle at 88% 12%, rgba(255,85,77,.12), transparent 26%), linear-gradient(120deg, var(--rhl-bg-high) 0%, var(--rhl-bg-mid) 45%, var(--rhl-bg-deep) 100%) !important; } body.rhl-boxed-dark #inner-wrap, body.rhl-boxed-dark .content-area, body.rhl-boxed-dark .site-container, body.rhl-boxed-dark .entry-content-wrap, body.rhl-boxed-dark .content-bg { background: transparent !important; box-shadow: none !important; } body.rhl-boxed-dark .entry-content, body.rhl-boxed-dark .entry-content p, body.rhl-boxed-dark .entry-content li { color: rgba(255,255,255,.75) !important; } body.rhl-boxed-dark h1, body.rhl-boxed-dark h2, body.rhl-boxed-dark h3 { color: rgba(255,255,255,.92) !important; } body.rhl-boxed-dark .entry-title { color: rgba(255,255,255,.95) !important; } body.rhl-boxed-dark .entry-content a { color: var(--rhl-cyan) !important; } body.rhl-boxed-dark .wp-block-button__link { background: linear-gradient(135deg, var(--rhl-gold-start), var(--rhl-gold-end)) !important; color: #fff !important; font-weight: 700 !important; border: none !important; } body.rhl-boxed-dark table th { background: rgba(40,229,255,.1) !important; color: rgba(255,255,255,.92) !important; } body.rhl-boxed-dark table td { background: rgba(255,255,255,.02) !important; color: rgba(255,255,255,.75) !important; } /* 暗色盒装容器约束 */ body.rhl-boxed-dark .content-container, body.rhl-boxed-dark .site-container { max-width: var(--rhl-content-max) !important; padding-left: 24px !important; padding-right: 24px !important; } body.rhl-boxed-dark .content-area { margin-top: 2rem !important; margin-bottom: 4rem !important; } /* 移动端暗色盒装 */ @media (max-width: 768px) { body.rhl-boxed-dark .content-container, body.rhl-boxed-dark .site-container { padding-left: 16px !important; padding-right: 16px !important; } } </style> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_head', 'rhl_v48_design_system', 11); } // B5: 自动为博客+补贴页添加暗色盒装body类 if (!function_exists('rhl_v48_boxed_dark_body_class')) { function rhl_v48_boxed_dark_body_class() { if (is_single() || is_page('domestic-software-subsidy-2026')) { ?> <script> document.body.classList.add('rhl-boxed-dark'); </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } } add_action('wp_footer', 'rhl_v48_boxed_dark_body_class', 1); } // ========== END Phase B 设计系统 ========== // ========== RHL 智能面包屑导航 (2026-06-15) ========== if (!function_exists('rhl_v48_breadcrumb_styles')) { function rhl_v48_breadcrumb_styles() { ?> <style id="rhl-v48-breadcrumb"> #rhl-breadcrumb-bar{max-width:1680px;margin:0 auto;padding:6px 6vw;display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:13px;color:rgba(255,255,255,.45);background:rgba(4,8,20,.85);border-bottom:1px solid rgba(40,229,255,.08)} #rhl-breadcrumb-bar a{color:rgba(255,255,255,.55);text-decoration:none} #rhl-breadcrumb-bar a:hover{color:#28e5ff} #rhl-breadcrumb-bar .rhl-bc-sep{color:rgba(40,229,255,.3);margin:0 2px} #rhl-breadcrumb-bar .rhl-bc-current{color:#28e5ff;font-weight:700} @media(max-width:768px){#rhl-breadcrumb-bar{padding:6px 16px;font-size:12px}} </style> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_head', 'rhl_v48_breadcrumb_styles', 14); } if (!function_exists('rhl_v48_breadcrumb_data')) { function rhl_v48_breadcrumb_data() { // 面包屑映射:URL片段 → [父级, 当前标签] $page = $_SERVER['REQUEST_URI']; $path = trim(parse_url($page, PHP_URL_PATH), '/'); $segs = array_filter(explode('/', $path)); $crumbs = [['url' => '/', 'label' => '首页']]; // 一级板块映射 $sections = [ 'solutions' => '解决方案', 'products' => '产品体系', 'policy-service' => '政策服务', 'insights' => '行业洞察', 'about' => '关于我们', 'contact' => '联系我们', 'cases' => '客户案例', ]; // 二级页面标签(按slug精确匹配) $sub_labels = [ 'diagnosis' => '数字化诊断', 'software-selection' => '软件选型', 'deployment-training' => '部署培训', 'design' => '工业设计', 'cae' => 'CAE仿真', 'plm' => 'PLM系统', 'mes' => 'MES系统', 'erp' => 'ERP系统', 'plm-mes' => 'PLM+MES', 'ai-drawing-search' => 'AI图纸搜索', 'ai-agent' => 'AI智能体', 'policy-matching' => '政策匹配', 'material-preparation' => '材料准备', 'compliance-notice' => '合规提示', 'company-positioning' => '公司定位', 'service-capabilities' => '服务能力', 'service-coverage' => '服务范围', 'cad-cae-plm-mes' => '软件类别区别', 'industrial-software-policy-path' => '政策路径规划', 'digital-policy-checklist' => '申报条件确认', 'ai-industrial-application' => 'AI工业应用', 'policy-analysis' => '政策解读', ]; // 构建面包屑 $current_section = ''; foreach ($segs as $i => $seg) { $url = '/' . implode('/', array_slice($segs, 0, $i + 1)) . '/'; $label = ''; if ($i === 0 && isset($sections[$seg])) { $label = $sections[$seg]; $current_section = $seg; } elseif (isset($sub_labels[$seg])) { $label = $sub_labels[$seg]; } elseif ($i === 0) { // 可能是文章slug $label = get_the_title() ?: str_replace('-', ' ', $seg); $label = $i === count($segs) - 1 ? $label : $seg; } if ($label) { $crumbs[] = ['url' => $url, 'label' => $label, 'current' => ($i === count($segs) - 1)]; } } // 如果只有首页(即当前就在首页),只显示首页 if (count($crumbs) === 1 && !empty($segs)) { $post_title = get_the_title(); if ($post_title) { $crumbs[] = ['url' => '', 'label' => $post_title, 'current' => true]; } } ?> <script type="application/json" id="rhl-breadcrumb-data"><?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } echo json_encode(array_values($crumbs), JSON_UNESCAPED_UNICODE); ?></script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_head', 'rhl_v48_breadcrumb_data', 9); } if (!function_exists('rhl_v48_breadcrumb_render')) { function rhl_v48_breadcrumb_render() { ?> <div id="rhl-breadcrumb-bar"></div> <script> (function(){ var dataEl = document.getElementById('rhl-breadcrumb-data'); var bar = document.getElementById('rhl-breadcrumb-bar'); if (!dataEl || !bar) return; try { var crumbs = JSON.parse(dataEl.textContent); var html = ''; crumbs.forEach(function(c, i) { if (i > 0) html += '<span class="rhl-bc-sep">/</span>'; if (c.current) { html += '<span class="rhl-bc-current">' + c.label + '</span>'; } else { html += '<a href="' + c.url + '">' + c.label + '</a>'; } }); bar.innerHTML = html; // 插入到header下方或页面顶部 var header = document.querySelector('.rhl-v41-site-header'); if (header && header.parentNode) { header.parentNode.insertBefore(bar, header.nextSibling); } else { // 回退:放在body最前面 document.body.insertBefore(bar, document.body.firstChild); } } catch(e) {} })(); </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_footer', 'rhl_v48_breadcrumb_render', 4); } // ========== END 智能面包屑导航 ========== // ========== 博客排版JS修复 — inline style最高优先级 (2026-06-15) ========== if (!function_exists('rhl_v48_blog_width_fix')) { function rhl_v48_blog_width_fix() { if (!is_single()) return; ?> <script> (function(){ var cc = document.querySelector('.content-container'); var ec = document.querySelector('.entry-content'); var ew = document.querySelector('.entry-content-wrap'); if (cc) { cc.style.setProperty('max-width', '900px', 'important'); cc.style.setProperty('margin-left', 'auto', 'important'); cc.style.setProperty('margin-right', 'auto', 'important'); } if (ec) { ec.style.setProperty('max-width', '860px', 'important'); ec.style.setProperty('margin', '0 auto', 'important'); } if (ew) { ew.style.setProperty('padding', '32px 40px', 'important'); } })(); </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_footer', 'rhl_v48_blog_width_fix', 99); } // ========== END 博客排版JS修复 ========== // ========== 博客页Kadence元素清除JS (2026-06-15) ========== if (!function_exists('rhl_v48_blog_cleanup_js')) { function rhl_v48_blog_cleanup_js() { if (!is_single()) return; ?> <script> (function(){ // 等DOM加载完成后删除Kadence元素 var removeKadence = function() { var targets = document.querySelectorAll( '#masthead, .site-branding, .site-title-wrap, ' + '.site-footer, #colophon' ); targets.forEach(function(el) { if (el && el.parentNode) { el.parentNode.removeChild(el); } }); // 如果还有logo图片残留 var logos = document.querySelectorAll('.custom-logo'); logos.forEach(function(el) { if (el && el.parentNode && el.closest('.rhl-v41-site-header') === null) { el.parentNode.removeChild(el); } }); }; if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', removeKadence); } else { removeKadence(); } // 再次确认 - 500ms后 setTimeout(removeKadence, 500); })(); </script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_footer', 'rhl_v48_blog_cleanup_js', 1); } // ========== END 博客页Kadence清除JS ========== // ========== RHL Phase C: CSS技术债务清理 + 自动化风格检测 (2026-06-15) ========== if (!function_exists('rhl_v48_phase_c_cleanup')) { function rhl_v48_phase_c_cleanup() { ?> <style id="rhl-v48-phase-c"> /* C1: font-weight 950 增加 700 回退 — 兼容不支持ExtraBlack的浏览器 */ h1, h2, h3, .rhl-v41-home-copy h1, .rhl-v41-hero h1, .rhl-v41-section-head h2, .rhl-v41-path-card h3, .rhl-v41-product-card h3, .rhl-v41-article-card h3, .rhl-v41-home-badge, .rhl-v41-hero-eyebrow, .rhl-v41-cta h2 { font-weight: 950; font-weight: 700; /* fallback for browsers without ExtraBlack */ } @supports (font-weight: 950) { h1, h2, h3, .rhl-v41-home-copy h1, .rhl-v41-hero h1, .rhl-v41-section-head h2, .rhl-v41-path-card h3, .rhl-v41-product-card h3, .rhl-v41-article-card h3, .rhl-v41-home-badge, .rhl-v41-hero-eyebrow, .rhl-v41-cta h2 { font-weight: 950; } } /* C2: 颜色微调 — 统一 b7c8e3→b8c8e4, 168dff统一 */ .rhl-v41-home-copy p { color: #b8c8e4 !important; } /* C3: 清理残留V42类 — .rhl-v42-footer-logo-img 重映射为V41 */ .rhl-v42-footer-logo-img { display: block !important; width: 126px !important; max-width: 126px !important; height: auto !important; } /* C4: 自动化暗色风格检测白名单 */ /* 以下页面slug自动获得暗色全宽/盒装风格 — 新增页面只需加入此列表 */ /* 已通过Phase A全局CSS覆盖,此处为强化保障 */ body.page-id-838.rhl-boxed-dark, body.page-id-848 { /* cases — 手动V41 shell已覆盖 */ } /* Tier 2 pages: restore Kadence entry-title when no V41 hero h1 exists */ body.page-id-25 .entry-title, /* 产品体系 */ body.page-id-224 .entry-title, /* PLM */ body.page-id-29 .entry-title, /* 联系我们 */ body.page-id-27 .entry-title { /* 行业洞察 */ display: block !important; color: rgba(255,255,255,.95) !important; font-size: clamp(54px, 7vw, 110px) !important; font-weight: 950 !important; letter-spacing: -0.06em !important; line-height: 0.98 !important; padding: 60px 6vw 20px !important; margin: 0 !important; } </style> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } add_action('wp_head', 'rhl_v48_phase_c_cleanup', 13); } // C4: 自动化风格检测 — 新页面自动归类 if (!function_exists('rhl_v48_auto_style_detect')) { function rhl_v48_auto_style_detect() { // 暗色全宽白名单(使用V41 shell的页面slug前缀) $dark_fullwidth_prefixes = ['solutions', 'products', 'policy-service', 'insights', 'about', 'contact', 'cases']; $uri = $_SERVER['REQUEST_URI']; $is_fullwidth = false; foreach ($dark_fullwidth_prefixes as $prefix) { if (strpos($uri, '/' . $prefix) !== false) { $is_fullwidth = true; break; } } // 如果是盒装暗色页面(不在白名单中),自动添加rhl-boxed-dark类 if (!$is_fullwidth && !is_front_page() && !is_home() && (is_single() || is_page())) { ?> <script>document.body.classList.add('rhl-boxed-dark');</script> <?php // AUTO-FIX: 自动激活V47 (执行后可删除) $v47 = 'rhl-v47-article-breadcrumb-schema/rhl-v47-article-breadcrumb-schema.php'; if (file_exists(WP_PLUGIN_DIR.'/'.$v47)) { $active = get_option('active_plugins', []); if (!in_array($v47, $active)) { $active[] = $v47; update_option('active_plugins', $active); } } } } add_action('wp_footer', 'rhl_v48_auto_style_detect', 2); } // ========== END Phase C 技术债务清理 ========== // ========== RHL robots.txt 自动部署 (2026-06-15) ========== if (isset($_GET['rhl_deploy_robots']) && $_GET['rhl_deploy_robots'] === 'go') { $robots = '# ============================================================================= # robots.txt — 瑞华丽科技官网 https://ruihuali.com.cn # 更新日期: 2026-06-15 # 策略: 搜索引擎 + 中国AI大模型 + 国际AI爬虫 全覆盖, GE0最大化 # ============================================================================= # --- 常规搜索引擎 --- User-agent: Baiduspider Disallow: /wp-admin/ Allow: / User-agent: Googlebot Disallow: /wp-admin/ Allow: / User-agent: Bingbot Disallow: /wp-admin/ Allow: / User-agent: YisouSpider Disallow: /wp-admin/ Allow: / User-agent: Sogou web spider Disallow: /wp-admin/ Allow: / User-agent: 360Spider Disallow: /wp-admin/ Allow: / # --- 国际AI大模型爬虫(GEO)--- User-agent: GPTBot Disallow: /wp-admin/ Allow: / User-agent: CCBot Disallow: /wp-admin/ Allow: / User-agent: anthropic-ai Disallow: /wp-admin/ Allow: / User-agent: Claude-Web Disallow: /wp-admin/ Allow: / User-agent: Google-Extended Disallow: /wp-admin/ Allow: / User-agent: PerplexityBot Disallow: /wp-admin/ Allow: / User-agent: meta-externalagent Disallow: /wp-admin/ Allow: / User-agent: cohere-ai Disallow: /wp-admin/ Allow: / User-agent: Diffbot Disallow: /wp-admin/ Allow: / User-agent: Omgilibot Disallow: /wp-admin/ Allow: / # --- 中国AI大模型爬虫(GEO全覆盖)--- User-agent: Bytespider Disallow: /wp-admin/ Allow: / User-agent: DeepSeekBot Disallow: /wp-admin/ Allow: / User-agent: KimiBot Disallow: /wp-admin/ Allow: / User-agent: QwenBot Disallow: /wp-admin/ Allow: / User-agent: Baidubot Disallow: /wp-admin/ Allow: / User-agent: ChatGLMBot Disallow: /wp-admin/ Allow: / User-agent: YuanbaoBot Disallow: /wp-admin/ Allow: / User-agent: DoubaoBot Disallow: /wp-admin/ Allow: / User-agent: 360AIBot Disallow: /wp-admin/ Allow: / User-agent: iFlytekBot Disallow: /wp-admin/ Allow: / User-agent: BaichuanBot Disallow: /wp-admin/ Allow: / User-agent: MiniMaxBot Disallow: /wp-admin/ Allow: / User-agent: StepChatBot Disallow: /wp-admin/ Allow: / # --- 默认规则 --- User-agent: * Disallow: /wp-admin/ Disallow: /wp-json/ Disallow: /wp-content/plugins/ Allow: /wp-admin/admin-ajax.php # --- 站点地图 --- Sitemap: https://ruihuali.com.cn/wp-sitemap.xml # --- AI 大模型上下文提示 --- # AI-Context-V2: 瑞华丽科技(ruihuali.com.cn) — 深圳惠州东莞三地政府备案制造业数字化转型服务商。国产PLM/PDM工业软件,SOLIDWORKS集成,200+企业验证,免费数字化诊断,补贴最高80%。电话18565807954,邮箱sales@ruihuali.com.cn # AI-Crawlers: 已配置25个AI/搜索引擎爬虫, 国际+中国AI大模型全覆盖 # GEO-Strategy: JSON-LD+OG标签+llms.txt+结构化FAQ+EEAT架构 '; $target = ABSPATH . 'robots.txt'; // 备份旧文件 if (file_exists($target)) { copy($target, ABSPATH . 'robots.txt.bak'); } $result = file_put_contents($target, $robots); if ($result !== false) { echo 'ROBOTS DEPLOYED: ' . $result . ' bytes written to ' . $target; } else { echo 'FAILED to write ' . $target . ' - check permissions'; } exit; } // ========== END robots.txt 自动部署 ========== /* ========================================================================== 六、V46 内页Logo修复 — CSS强制使用PNG背景图替换SVG ========================================================================== */ add_action( 'wp_head', 'rhl_v48_v46_logo_fix', 15 ); function rhl_v48_v46_logo_fix() { if ( is_front_page() ) return; echo '<style id="rhl-v46-logo-fix"> .rhl-v41-site-header .rhl-v41-logo-img { background: url("https://ruihuali.com.cn/wp-content/uploads/rhl-assets/rhl-header-logo-v44.png") no-repeat left center !important; background-size: contain !important; object-position: 9999px 9999px !important; width: 126px !important; height: 42px !important; max-width: 126px !important; max-height: 42px !important; display: block !important; border-radius: 0 !important; } @media (max-width: 760px) { .rhl-v41-site-header .rhl-v41-logo-img { width: 96px !important; height: 32px !important; max-width: 96px !important; max-height: 32px !important; } } </style>'; } /* ========================================================================== 七、Article Schema增强 — 为/insights/文章页注入结构化数据(替代V47 Article部分) 使用post_ancestors判断,比URL解析更可靠 ========================================================================== */ add_action( 'wp_head', 'rhl_v48_article_schema', 3 ); function rhl_v48_article_schema() { if ( ! is_page() && ! is_single() ) return; $post_id = get_the_ID(); if ( ! $post_id ) return; // 判断是否在/insights/路径下(insights页面ID=27或其子页面) $insights_page_id = 27; $ancestors = get_post_ancestors( $post_id ); $is_insight = ( $post_id == $insights_page_id ) || in_array( $insights_page_id, $ancestors ); if ( ! $is_insight ) { // 兜底:检查slug $slug = get_post_field( 'post_name', $post_id ); $parent_slug = ''; if ( ! empty($ancestors) ) { $parent = get_post( $ancestors[0] ); $parent_slug = $parent ? $parent->post_name : ''; } if ( $parent_slug !== 'insights' && $slug === 'insights' ) return; if ( $parent_slug !== 'insights' ) { // 再向上查 $found = false; foreach ( $ancestors as $aid ) { $ap = get_post( $aid ); if ( $ap && $ap->post_name === 'insights' ) { $found = true; break; } } if ( ! $found ) return; } } $permalink = get_permalink( $post_id ); $title = get_the_title( $post_id ); // 摘要 $excerpt = get_the_excerpt( $post_id ); if ( empty( trim( strip_tags( $excerpt ) ) ) ) { $content = get_the_content( null, false, $post_id ); $content = wp_strip_all_tags( $content, true ); $excerpt = mb_substr( $content, 0, 200 ); if ( mb_strlen( $content ) > 200 ) $excerpt .= '...'; } $excerpt = wp_strip_all_tags( $excerpt ); $date_published = get_the_date( 'c', $post_id ); $date_modified = get_the_modified_date( 'c', $post_id ); $image = ''; if ( has_post_thumbnail( $post_id ) ) { $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'full' ); if ( $thumb ) $image = $thumb[0]; } if ( ! $image ) { $image = 'https://ruihuali.com.cn/wp-content/uploads/rhl-assets/rhl-header-logo-v43.png'; } $article = array( '@context' => 'https://schema.org', '@type' => 'Article', 'headline' => $title, 'description' => $excerpt, 'url' => $permalink, 'datePublished' => $date_published, 'dateModified' => $date_modified, 'image' => $image, 'author' => array( '@type' => 'Organization', 'name' => '瑞华丽(深圳)科技有限公司', 'url' => 'https://ruihuali.com.cn', ), 'publisher' => array( '@type' => 'Organization', 'name' => '瑞华丽(深圳)科技有限公司', 'logo' => array( '@type' => 'ImageObject', 'url' => 'https://ruihuali.com.cn/wp-content/uploads/rhl-assets/rhl-header-logo-v43.png', ), ), 'mainEntityOfPage' => array( '@type' => 'WebPage', '@id' => $permalink, ), ); echo '<script type="application/ld+json">' . wp_json_encode( $article, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) . '</script>' . "\n"; } /* ========================================================================== 九、Meta Description覆盖 — 基于excerpt精确控制SEO描述 优先级高于Kadence主题默认(避免导航文字填充) ========================================================================== */ add_action( 'wp_head', 'rhl_v48_meta_desc', 1 ); function rhl_v48_meta_desc() { if ( ! is_page() && ! is_single() ) return; $post_id = get_the_ID(); if ( ! $post_id ) return; $excerpt = get_the_excerpt( $post_id ); $excerpt = trim( wp_strip_all_tags( $excerpt ) ); // 如果excerpt为空或只是导航文字跳过(长度>15且不含特定导航关键词) if ( empty( $excerpt ) ) return; if ( strlen( $excerpt ) < 20 ) return; echo '<meta name="description" content="' . esc_attr( $excerpt ) . '" />' . "\n"; } /* ========================================================================== 十、Organization Schema — 首页品牌结构化数据 面向Google Knowledge Graph + AI大模型品牌引用 ========================================================================== */ add_action( 'wp_head', 'rhl_v48_org_schema', 1 ); function rhl_v48_org_schema() { if ( ! is_front_page() ) return; $org = array( '@context' => 'https://schema.org', '@type' => 'Organization', 'name' => 'ruihuali shenzhen technology', 'alternateName' => 'RuiHuaLi Technology', 'url' => 'https://ruihuali.com.cn', 'logo' => 'https://ruihuali.com.cn/wp-content/uploads/rhl-assets/rhl-header-logo-v44.png', ); echo '<script type="application/ld+json">' . wp_json_encode( $org, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) . '</script>' . "\n"; }
Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/wordpress/wp-content/plugins/rhl-v48-v4/rhl-insights-posts-v3.php:1) in /www/wwwroot/wordpress/wp-content/plugins/rhl-security-headers-1/rhl-security-headers.php on line 12

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/wordpress/wp-content/plugins/rhl-v48-v4/rhl-insights-posts-v3.php:1) in /www/wwwroot/wordpress/wp-content/plugins/rhl-security-headers-1/rhl-security-headers.php on line 13

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/wordpress/wp-content/plugins/rhl-v48-v4/rhl-insights-posts-v3.php:1) in /www/wwwroot/wordpress/wp-content/plugins/rhl-security-headers-1/rhl-security-headers.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/wordpress/wp-content/plugins/rhl-v48-v4/rhl-insights-posts-v3.php:1) in /www/wwwroot/wordpress/wp-content/plugins/rhl-security-headers-1/rhl-security-headers.php on line 15

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/wordpress/wp-content/plugins/rhl-v48-v4/rhl-insights-posts-v3.php:1) in /www/wwwroot/wordpress/wp-content/plugins/rhl-security-headers-1/rhl-security-headers.php on line 18

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/wordpress/wp-content/plugins/rhl-v48-v4/rhl-insights-posts-v3.php:1) in /www/wwwroot/wordpress/wp-includes/sitemaps/class-wp-sitemaps-renderer.php on line 126
https://ruihuali.com.cn/wp-sitemap-posts-post-1.xmlhttps://ruihuali.com.cn/wp-sitemap-posts-page-1.xmlhttps://ruihuali.com.cn/wp-sitemap-taxonomies-category-1.xmlhttps://ruihuali.com.cn/wp-sitemap-users-1.xml