diff --git a/404.php b/404.php index 3f99a24..4dfc2e5 100644 --- a/404.php +++ b/404.php @@ -1,5 +1,9 @@
diff --git a/CODE_CLEANUP_PLAN.md b/CODE_CLEANUP_PLAN.md index dae1ca4..10e30c2 100644 --- a/CODE_CLEANUP_PLAN.md +++ b/CODE_CLEANUP_PLAN.md @@ -1,225 +1,63 @@ -# 代码清理方案 +# B2B Trade 2.1.0 清理记录 -> 项目:B2B Trade 主题(fragrance-trade) -> 基准:2026-07-24 全量代码扫描 -> 原则:分阶段、可回滚、每步可验证 +本文记录 2.1.0 已执行的清理和必须保留的兼容边界,后续维护不得重新引入已删除的运行路径。 ---- +## 已完成 -## 清理范围总览 +### 联系流程 -| 类别 | 数量 | 风险 | 说明 | -|------|------|------|------| -| 死模板文件 | 7 个 | 低 | 多页面重构后遗留,无任何 `get_template_part()` 引用 | -| 死 JS 库 | 4 个 | 中 | plugins.js 中 6 个库仅 1 个实际使用 | -| 死 CSS 样式 | ~60% vendor.css | 低 | Jarallax + AOS 样式,对应功能未使用 | -| 死图片资源 | 13 个 | 极低 | 旧模板遗留素材,全项目零引用 | -| 死表单处理器 | 1 个 | 中 | inquiry.php 仍挂在 admin_post 但无表单提交 | -| CDN 安全缺失 | 2 处 | 中 | Bootstrap 无 SRI 完整性校验 | -| jQuery 冗余依赖 | 1 处 | 中 | 仅为 Colorbox 一个函数加载整个 jQuery | +- 联系页只展示联系方式、营业时间和地图导航。 +- 不注册前端提交处理、邮件发送、成功/失败状态或防重放字段。 +- 服务入口统一跳转 `/contact/`,不拼接服务查询参数。 +- 旧的附加查询参数不会影响页面访问,但主题不消费它。 ---- +### 前端依赖 -## 阶段一:死代码删除(零风险) +- Bootstrap 5.3.8 固定在 `assets/vendor/bootstrap/`,包含 CSS、bundle JS 和许可证。 +- `theme.js` 使用原生 DOM API。 +- 外部视频只在新标签页打开,不解析视频域名、不生成 iframe。 +- 字体使用系统英文/中文字体栈。 +- 删除无消费者的通用重置包、弹窗样式与脚本聚合文件。 -> 删除后不影响任何已上线页面。每步删完刷新全站确认无报错。 +### 数据与初始化 -### 1.1 删除 7 个死模板文件 +- 初始化由 `fragrance_trade_schema_version` 控制。 +- 7 个默认服务来自 `fragrance_trade_service_seeds()`,种子标识写入 `_fragrance_seed_key`。 +- 写入失败会记录后台错误,当前迁移版本不会推进。 +- 约定页面会复用已有内容和状态,只补齐页面模板。 +- 用户已有的非发布页面不会被自动发布或恢复。 +- 旧产品外观设置仅在旧站迁移时读取。 -| 文件 | 原用途 | 替代方案 | -|------|--------|----------| -| `template-parts/home/products.php` | 旧 B2B 产品展示 | 已被 CPT `service` + `service-teaser.php` 替代 | -| `template-parts/home/services.php` | 旧服务总览 | 已被 `service-teaser.php` 替代 | -| `template-parts/home/quality.php` | 旧质检流程 | 首页不再展示,内容可在关于页补充 | -| `template-parts/home/process.php` | 旧施工流程 | 首页不再展示 | -| `template-parts/home/projects.php` | 旧项目案例 | 已被 CPT `case` + `case-teaser.php` 替代 | -| `template-parts/home/customization.php` | 旧定制服务 | 首页不再展示 | -| `template-parts/home/rfq.php` | 旧预约表单 | 联系页已改为联系方式卡片,无表单 | +### 资源与样式 -**验证方法**:删除后逐页访问首页 / 关于 / FAQ / 联系页 / 服务列表 / 案例列表,确认无 500 错误、无模板缺失警告。 +- 删除 7 张未被模板引用的旧产品位图。 +- 删除未引用的 Logo 占位图。 +- 保留汽车贴膜服务、门店、视频和案例的中性 SVG 占位图。 +- 删除没有 PHP 或 JS 消费者的质量、流程、项目和定制板块配置与 CSS。 +- 首页两个展示查询使用 `no_found_rows`。 +- 默认值数组在单次请求内缓存。 -### 1.2 删除 13 个死图片资源 +### 安全与直接访问 -| 文件 | 说明 | -|------|------| -| `assets/images/main-logo.png` | 旧 logo,已用 `placeholder-logo.svg` + WP custom-logo | -| `assets/images/product-item1.jpg` | 旧产品图 ×3 | -| `assets/images/product-item2.jpg` | | -| `assets/images/product-item3.jpg` | | -| `assets/images/insta-item1.jpg` | 旧 Instagram 展示图 ×6 | -| `assets/images/insta-item2.jpg` | | -| `assets/images/insta-item3.jpg` | | -| `assets/images/insta-item4.jpg` | | -| `assets/images/insta-item5.jpg` | | -| `assets/images/insta-item6.jpg` | | -| `assets/images/single-image1.png` | 旧单图素材 | -| `assets/images/factory-workflow-illustration.webp` | 旧流程插图 | +- 所有主题 PHP 入口、模块和模板片段均检查 `ABSPATH`。 +- 输出 URL、属性、纯文本和富文本继续按上下文转义。 +- 视频新窗口链接使用 `noopener noreferrer`。 +- 地图链接优先使用 `store_map_url`,否则仅根据非空地址生成。 -**验证方法**:全项目 grep 这些文件名,确认零引用(已验证)。 +## 保留的兼容接口 ---- +- 文本域:`fragrance-trade` +- PHP 函数前缀:`fragrance_trade_` +- CSS 前缀:`b2b-` +- 地图设置键:`store_map_url` +- 服务旧图片元数据:`_service_image` +- 旧安装识别选项:`fragrance_trade_setup_done` -## 阶段二:JS 依赖瘦身(中等风险) +这些标识符涉及已有站点数据或第三方定制,未经正式迁移方案不得全局改名或删除。 -> 当前 plugins.js 拼接了 6 个库,但只有 Colorbox 真正在用。 -> AOS 虽然在 theme.js 中初始化,但没有任何模板使用 `data-aos` 属性,属于空转。 +## 后续资源替换原则 -### 2.1 库使用情况核实 - -| 库 | plugins.js 中 | theme.js 调用 | 模板中使用 | 结论 | -|----|--------------|---------------|-----------|------| -| jQuery Easing | 有 | 无 | 无 | **删除** | -| Jarallax v2.0.2 | 有 | 无 | 无 | **删除** | -| Colorbox 1.6.4 | 有 | `$.fn.colorbox()` | `class="youtube"` 在 video.php | **保留** | -| AOS | 有 | `AOS.init()` | 无 `data-aos` 属性 | **删除** | -| anime.js | 有 | 无 | 无 | **删除** | -| HC-Sticky | 有 | 无 | 无 | **删除** | - -### 2.2 操作步骤 - -**步骤 A — 清理 theme.js 中的 AOS 调用** - -删除 `initAnimations()` 函数及其调用(第 19-22 行、第 42 行)。AOS 在空转,删了不影响任何可见效果。 - -**步骤 B — 重写 plugins.js** - -将 plugins.js 从 6 库拼接缩减为仅保留 Colorbox 1.6.4(约 4KB)。其余 5 个库全部移除。 - -**步骤 C — 清理 vendor.css** - -删除 vendor.css 中的 Jarallax 样式(第 6-36 行)和 AOS 样式(第 89 行至文件末尾的大段压缩 CSS)。仅保留 Colorbox 样式(第 39-85 行)。 - -**步骤 D — 评估 jQuery 去留** - -Colorbox 依赖 jQuery。两个选项: - -| 方案 | 改动量 | 效果 | -|------|--------|------| -| **A. 保留 jQuery**(推荐当前阶段) | 无 | 维持现状,Colorbox 正常工作 | -| B. 用原生 lightbox 替代 Colorbox | 中等 | 彻底去掉 jQuery 依赖,减少 ~90KB 加载 | - -> 方案 B 需要找一个不依赖 jQuery 的 lightbox 库(如 GLightbox)并改写 theme.js 的 `initVideoLightbox()`。建议放到独立迭代中做,不在本次清理范围内。 - -**验证方法**: -1. 打开关于门店页,点击施工视频缩略图,确认 Colorbox 弹窗正常弹出 -2. 检查浏览器控制台无 JS 报错 -3. 对比清理前后页面加载时间(预计减少 ~80KB JS 传输) - ---- - -## 阶段三:死表单处理器处理(中等风险) - -### 3.1 现状 - -`inc/inquiry.php` 注册了 `admin_post_fragrance_rfq` 和 `admin_post_nopriv_fragrance_rfq` 两个 hook,但联系页已无表单,这些 hook 永远不会被触发。 - -### 3.2 两个选项 - -| 方案 | 操作 | 理由 | -|------|------|------| -| **A. 保留但标注弃用**(推荐) | 在文件头加 `@deprecated` 注释,保留 hook 注册 | 未来可能恢复预约表单功能,代码本身安全合规,留着不碍事 | -| B. 完全删除 | 删除 inquiry.php + 从 functions.php 移除加载 | 彻底清理,但未来恢复需重写 | - -> 推荐 A:inquiry.php 的安全实现(nonce + honeypot + 速率限制 + 邮件头注入防护)是项目中的优秀范例,删了可惜。标注弃用即可。 - ---- - -## 阶段四:CDN 安全加固(中等风险) - -### 4.1 现状 - -`inc/setup.php` 第 47-54 行从 `cdn.bootcdn.net` 加载 Bootstrap CSS/JS,无 `integrity` 属性(SRI),无本地回退。如果 CDN 被劫持,攻击者可注入恶意代码。 - -### 4.2 操作步骤 - -**步骤 A — 添加 SRI 完整性校验** - -为 Bootstrap CSS 和 JS 添加 `integrity` + `crossorigin` 属性。需要从 [BootCDN](https://www.bootcdn.cn/) 获取对应版本的 SRI 哈希。 - -```php -// 修改前 -wp_enqueue_style( 'fragrance-bootstrap', 'https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.0-alpha3/css/bootstrap.min.css', array(), '5.3.0-alpha3' ); - -// 修改后(需填入实际哈希) -wp_enqueue_style( 'fragrance-bootstrap', 'https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.3.0-alpha3/css/bootstrap.min.css', array(), '5.3.0-alpha3' ); -// WP 的 wp_enqueue_style 不直接支持 integrity,需用 style_loader_tag 过滤器追加属性 -``` - -由于 WordPress 的 `wp_enqueue_*` 函数不直接支持 `integrity` / `crossorigin` 属性,需要通过 `style_loader_tag` 和 `script_loader_tag` 过滤器注入: - -```php -// 在 inc/setup.php 中添加 -function fragrance_trade_resource_integrity( $html, $handle ) { - $sri = array( - 'fragrance-bootstrap' => 'sha384-XXXXX', // 替换为实际哈希 - ); - if ( isset( $sri[ $handle ] ) ) { - $html = str_replace( '/>', ' integrity="' . $sri[ $handle ] . '" crossorigin="anonymous" />', $html ); - } - return $html; -} -add_filter( 'style_loader_tag', 'fragrance_trade_resource_integrity', 10, 2 ); -``` - -> **注意**:Google Fonts 不支持 SRI(动态生成 CSS),保持现状即可。 - -**步骤 B — 可选:本地回退** - -将 Bootstrap 下载到 `assets/vendor/bootstrap/`,CDN 加载失败时自动回退。此步骤为可选项,当前 CDN 可用性已较高。 - -**验证方法**:浏览器 DevTools → Network → 确认 Bootstrap 资源加载请求携带 `integrity` 头。 - ---- - -## 阶段五:Customizer 配置清理(低风险) - -### 5.1 现状 - -`inc/customizer.php` 中仍有大量为已删除模板配置的 Customizer 字段(products、services、quality、process、projects、customization 等)。这些字段在后台 Customizer 面板中可见但对应的模板已不存在,用户会困惑。 - -### 5.2 操作步骤 - -1. 逐个移除已删除模板对应的 Customizer section + 字段注册代码 -2. 对应的 `inc/defaults.php` 默认值也一并清理 -3. 保留仍在使用的 section:hero、trust、store_info、contact_social、video、documents、faq - -> **注意**:此阶段改动量大且涉及 Customizer 面板结构,建议在测试环境验证后再上线。 - ---- - -## 执行顺序与预估 - -| 阶段 | 内容 | 文件改动数 | 风险 | 建议优先级 | -|------|------|-----------|------|-----------| -| 一 | 删死模板 + 死图片 | 删 20 个文件 | 极低 | 立即执行 | -| 二 | JS 库瘦身 | 改 3 个文件 | 中 | 紧随其后 | -| 三 | 表单处理器标注 | 改 1 个文件 | 极低 | 随手做 | -| 四 | CDN SRI 加固 | 改 1 个文件 | 低 | 本周内 | -| 五 | Customizer 清理 | 改 2 个文件 | 中 | 下次迭代 | - ---- - -## 每阶段完成后的检查清单 - -- [ ] 全站逐页访问无 500 / 404 -- [ ] 浏览器控制台无 JS 报错 -- [ ] WP Debug Log 无 PHP warning/notice -- [ ] Customizer 面板无残留无效 section -- [ ] Git 提交信息标注 `[cleanup]` + 阶段编号 -- [ ] 推送到 Gitea 前本地验证通过 - ---- - -## 回滚方案 - -每个阶段独立提交,如果发现问题: - -```bash -# 查看提交历史 -git log --oneline - -# 回退到指定提交 -git revert -``` - -阶段一和阶段二各自独立 commit,确保可单独回滚。 +- 运营图片应通过特色图片或外观配置上传,不写入主题默认数据。 +- 默认主题包只提供中性占位素材。 +- 新前端依赖必须本地打包、记录版本与许可证,并经过无外部请求扫描。 +- 开发验证工具不应作为主题运行依赖进入生产请求路径。 diff --git a/CODE_REVIEW_STANDARD.md b/CODE_REVIEW_STANDARD.md index 6b17141..3c364cc 100644 --- a/CODE_REVIEW_STANDARD.md +++ b/CODE_REVIEW_STANDARD.md @@ -1,266 +1,138 @@ -# 代码审查标准与流程 +# B2B Trade 发布审查标准 -> 适用项目:B2B Trade 主题(fragrance-trade) -> 技术栈:WordPress 经典主题 / PHP 7.4+ / Bootstrap 5.3 / jQuery -> 版本:v1.0 | 2026-07-24 +适用范围:B2B Trade 2.1.x,WordPress 6.8+,PHP 8.1+。 ---- +## 1. 自动检查 -## 一、审查原则 +每次发布必须满足: -1. **安全优先** — WordPress 主题的 XSS / SQL 注入 / CSRF 是红线 -2. **就事论事** — 评论针对代码,不针对人 -3. **说清楚为什么** — 不只说"改这个",要解释原因和潜在风险 -4. **给方向不给答案** — 引导作者自己思考,除非是明确的安全漏洞 -5. **赞美好代码** — 发现优秀实践要明确指出,让团队学习 +- `git diff --check` 无输出; +- 所有 PHP 文件在 PHP 8.1 CLI 下通过 `php -l`; +- PHPCS 通过 WordPress Coding Standards 与 PHPCompatibilityWP; +- `node --check assets/js/theme.js` 通过; +- CSS 花括号配对,所有 `url(...)` 本地资源存在; +- PHP、CSS 和 JS 不包含脚本、样式或字体 CDN 请求; +- 主题引用的本地静态资源全部存在; +- 仓库不包含已清退的旧业务词、旧视频弹窗库或旧产品位图。 ---- +## 2. 初始化与数据安全 -## 二、优先级体系 - -每个审查意见必须标注以下级别之一: - -| 级别 | 标记 | 含义 | 处理要求 | -|------|------|------|----------| -| 🔴 阻断 | Blocker | 安全漏洞 / 数据丢失 / 破坏功能 | **必须修复后才能合并** | -| 🟡 建议 | Suggestion | 输入验证缺失 / 性能问题 / 可维护性 | **应当修复,可协商** | -| 💭 细节 | Nit | 命名 / 风格 / 文档 | 修不修都行,不阻塞 | - ---- +在空数据库中: -## 三、WordPress 主题专项审查清单 +1. 安装 WordPress 并激活主题; +2. 确认创建 7 个带种子标识的服务; +3. 确认创建 `home`、`about`、`faq`、`contact`; +4. 再运行两次初始化; +5. 确认服务数和页面数不增加; +6. 确认 `fragrance_trade_schema_version` 仅在无错误时推进。 -### 🔴 阻断级检查项(必须全部通过) +在已有数据库中: -#### 3.1 安全性 +- 已有页面正文、标题和状态不被覆盖; +- 草稿、私密或回收站页面不被自动发布; +- 对应页面模板被补齐; +- 后台显示非发布状态提醒; +- 已有 `_service_image` 和 `store_map_url` 保持有效。 -- [ ] **直接访问防护** — 所有 PHP 文件以 `if ( ! defined( 'ABSPATH' ) ) exit;` 开头 -- [ ] **SQL 注入** — 禁止拼接 SQL;必须使用 `$wpdb->prepare()` 或 WP API(`get_posts()`, `WP_Query`) -- [ ] **XSS 防护** — 所有输出必须经过转义: - - HTML 文本 → `esc_html()` - - URL → `esc_url()` - - 属性 → `esc_attr()` - - 富文本 → `wp_kses_post()` -- [ ] **CSRF 防护** — 所有表单提交 / POST 处理必须有 `wp_nonce_field()` + `check_admin_referer()` -- [ ] **输入净化** — 所有 `$_POST` / `$_GET` / `$_SERVER` 必须用 `wp_unslash()` + 对应 `sanitize_*` 函数 -- [ ] **邮件头注入** — 从用户输入构造邮件头时,必须剥离 `\r\n` -- [ ] **文件包含** — 禁止用户输入直接传入 `include` / `require` / `get_template_part()` -- [ ] **权限检查** — 任何管理员操作必须有 `current_user_can()` 检查 - -#### 3.2 功能正确性 +需要注入一次 `wp_insert_post()` 错误,确认错误被记录、管理员可见且迁移版本不推进。 -- [ ] **关键路径错误处理** — 表单提交失败有 fallback(非空白白屏) -- [ ] **数据完整性** — 不会因空值 / 缺失字段导致 fatal error -- [ ] **重定向安全** — 使用 `wp_safe_redirect()` + `wp_validate_redirect()`,禁止直接 `header('Location:')` +## 3. 页面冒烟 -### 🟡 建议级检查项 +以下页面必须返回预期状态,并且 PHP 日志无 Warning、Deprecated、Parse 或 Fatal: -#### 3.3 输入验证与数据 +| 页面 | 预期 | +| --- | --- | +| 首页 | 200 | +| 服务列表 | 200 | +| 服务详情 | 200 | +| 案例列表 | 200 | +| 案例详情 | 200 | +| 关于门店 | 200 | +| 常见问题 | 200 | +| 联系我们 | 200 | +| 普通文章 | 200 | +| 搜索结果 | 200 | +| 不存在路径 | 404 | -- [ ] Customizer 字段是否有对应类型的 `sanitize_callback` -- [ ] `get_theme_mod()` 取值后是否有默认值兜底 -- [ ] 用户上传的 URL 是否用 `esc_url_raw()` 存入、`esc_url()` 输出 +浏览器控制台不得出现 JavaScript 错误,Network 面板不得出现主题资源 404。 -#### 3.4 性能 +## 4. 业务分支 -- [ ] **N+1 查询** — 循环内不执行数据库查询,提前预取 -- [ ] **资源加载** — 脚本用 `wp_enqueue_script`,不硬编码 `', ' integrity="' . esc_attr( $sri[ $handle ] ) . '" crossorigin="anonymous">', $html ); - } - return $html; -} -add_filter( 'script_loader_tag', 'fragrance_trade_script_sri', 10, 2 ); diff --git a/index.php b/index.php index 02bb067..4749b33 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,9 @@
diff --git a/languages/fragrance-trade.pot b/languages/fragrance-trade.pot new file mode 100644 index 0000000..c1e7a21 --- /dev/null +++ b/languages/fragrance-trade.pot @@ -0,0 +1,827 @@ +# Copyright (C) 2026 B2B Trade +# This file is distributed under the GNU General Public License v2 or later. +msgid "" +msgstr "" +"Project-Id-Version: B2B Trade 2.1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-24 14:19+0000\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Domain: fragrance-trade\n" + +#: scripts/demo-content.php:71 +msgid "B2B Trade 中性演示图" +msgstr "" + +#: inc/cpt.php:391 +msgid "B2B Trade 主题初始化未完成" +msgstr "" + +#: inc/cpt.php:421 +msgid "B2B Trade 约定页面尚未发布" +msgstr "" + +#: footer.php:8 +msgid "Facebook" +msgstr "" + +#: inc/customizer.php:90 +msgid "Facebook 链接" +msgstr "" + +#: footer.php:10 +msgid "Instagram" +msgstr "" + +#: inc/customizer.php:94 +msgid "Instagram 链接" +msgstr "" + +#: footer.php:9 +msgid "LinkedIn" +msgstr "" + +#: inc/customizer.php:93 +msgid "LinkedIn 链接" +msgstr "" + +#: inc/customizer.php:89 +msgid "WhatsApp 号码(含国家代码)" +msgstr "" + +#: footer.php:8 +msgid "X / Twitter" +msgstr "" + +#: inc/customizer.php:91 +msgid "X / Twitter 链接" +msgstr "" + +#: footer.php:9 +msgid "YouTube" +msgstr "" + +#: inc/customizer.php:92 +msgid "YouTube 链接" +msgstr "" + +#: inc/customizer.php:81 +msgid "YouTube、Vimeo 或视频链接" +msgstr "" + +#: inc/defaults.php:72 +msgid "不同膜料和施工环境所需的稳定时间不同。交车时请确认首次洗车时间,并避免过早使用高压水枪冲洗膜边。" +msgstr "" + +#: inc/defaults.php:92 +msgid "专注汽车贴膜方案沟通、施工交付与日常护理说明。" +msgstr "" + +#: inc/cpt.php:118 +msgid "个性定制彩绘膜" +msgstr "" + +#: scripts/demo-content.php:97 +msgid "中性施工案例" +msgstr "" + +#: header.php:23 inc/setup.php:25 +msgid "主导航" +msgstr "" + +#: inc/helpers.php:104 +msgid "主导航菜单项过少" +msgstr "" + +#: inc/customizer.php:70 +msgid "主按钮文字" +msgstr "" + +#: inc/customizer.php:71 +msgid "主按钮链接" +msgstr "" + +#: inc/customizer.php:68 +msgid "主标题" +msgstr "" + +#: inc/cpt.php:425 +msgid "主题保留了这些页面的当前状态,不会自动发布或恢复它们:%s。请确认状态后再用于前台导航。" +msgstr "" + +#: inc/defaults.php:25 +msgid "了解服务项目" +msgstr "" + +#: inc/defaults.php:48 +msgid "了解汽车贴膜施工步骤" +msgstr "" + +#: inc/defaults.php:53 +msgid "交付信息更清楚" +msgstr "" + +#: inc/defaults.php:42 +msgid "交付检查与护理说明" +msgstr "" + +#: inc/defaults.php:34 template-parts/home/documents.php:12 +msgid "交付说明" +msgstr "" + +#: inc/defaults.php:59 +msgid "产品与质保凭证" +msgstr "" + +#: template-parts/home/case-teaser.php:20 +msgid "从案例了解不同项目的实际效果" +msgstr "" + +#: archive-service.php:29 +msgid "从车漆保护、外观改色到车窗隔热,按车型与使用需求查看可选项目。" +msgstr "" + +#: template-parts/home/faq.php:11 +msgid "以下内容用于帮助您提前了解选择和施工注意事项。具体项目、价格、工期与质保,请以门店最终确认为准。" +msgstr "" + +#: inc/customizer.php:54 +msgid "信任栏" +msgstr "" + +#: inc/customizer.php:74 +msgid "信任栏标题" +msgstr "" + +#: inc/customizer.php:103 +msgid "信任点 %d 数值" +msgstr "" + +#: inc/customizer.php:104 +msgid "信任点 %d 标签" +msgstr "" + +#: page-about.php:86 +msgid "先看样板,再决定" +msgstr "" + +#: inc/cpt.php:110 +msgid "全景天窗 · 隔热需求 · 安装评估" +msgstr "" + +#: archive-case.php:43 +msgid "全部" +msgstr "" + +#: inc/cpt.php:23 +msgid "全部服务项目" +msgstr "" + +#: inc/cpt.php:43 +msgid "全部案例" +msgstr "" + +#: page-about.php:45 +msgid "关于我们" +msgstr "" + +#: footer.php:28 inc/cpt.php:286 inc/helpers.php:64 page-about.php:28 +msgid "关于门店" +msgstr "" + +#: inc/defaults.php:33 +msgid "关键节点及时同步" +msgstr "" + +#: header.php:38 +msgid "关闭导航" +msgstr "" + +#: inc/helpers.php:93 +msgid "前台暂时显示主题默认导航。请创建正式菜单并分配到“主导航”。" +msgstr "" + +#: inc/cpt.php:113 +msgid "前挡专用膜" +msgstr "" + +#: inc/cpt.php:114 +msgid "前挡膜重点平衡透光视野、隔热需求和夜间驾驶体验,选购时应核对产品参数及当地法规要求。" +msgstr "" + +#: inc/cpt.php:115 +msgid "前挡适用 · 透光视野 · 隔热需求" +msgstr "" + +#: inc/defaults.php:76 +msgid "可以先查看色卡和现有样板。是否能进行小面积试贴,取决于所选膜料和车辆部位,请在施工前与门店确认。" +msgstr "" + +#: inc/defaults.php:70 +msgid "可以带上参考图,由门店结合车型曲面、膜料效果和施工条件评估。成品会受材质与光线影响,不能仅以屏幕图片作为最终颜色依据。" +msgstr "" + +#: inc/defaults.php:69 +msgid "可以按我的参考图样施工吗?" +msgstr "" + +#: inc/defaults.php:68 +msgid "可以结合预算、车辆用途、停车环境和外观偏好进行选择。建议到店查看实物色卡与样板,并确认不同光线下的效果。" +msgstr "" + +#: inc/defaults.php:74 +msgid "可以讨论分区搭配,但需要同时考虑颜色协调、膜料厚度、收边位置和后续维护,再确认是否适合施工。" +msgstr "" + +#: inc/cpt.php:119 +msgid "可根据参考图和车辆尺寸沟通定制外观方案,制作前确认图案、颜色、覆盖范围与交付效果。" +msgstr "" + +#: template-parts/home/cta.php:11 +msgid "告诉我们车型、使用场景、关注的问题和预算范围,门店会结合实际情况说明可选项目与到店安排。" +msgstr "" + +#: page-contact.php:44 +msgid "咨询与到店" +msgstr "" + +#: single-case.php:42 +msgid "咨询同类施工" +msgstr "" + +#: page-contact.php:46 +msgid "咨询时可说明车型、年份、想做的项目和期望时间,方便门店更快判断可选方案。" +msgstr "" + +#: inc/defaults.php:77 +msgid "咨询时需要提供哪些信息?" +msgstr "" + +#: inc/customizer.php:112 +msgid "回答 %d" +msgstr "" + +#: inc/cpt.php:120 +msgid "图案沟通 · 方案确认 · 定制施工" +msgstr "" + +#: page-contact.php:112 +msgid "在百度地图中导航" +msgstr "" + +#: page-contact.php:72 +msgid "在线咨询" +msgstr "" + +#: inc/customizer.php:98 +msgid "地图导航链接" +msgstr "" + +#: inc/cpt.php:108 +msgid "天窗冰甲" +msgstr "" + +#: inc/defaults.php:60 +msgid "如项目适用,提供对应品牌或产品的凭证与质保说明。" +msgstr "" + +#: inc/defaults.php:54 +msgid "实际提供的文件因项目和膜料而异,下单前可向门店确认。" +msgstr "" + +#: inc/helpers.php:92 +msgid "尚未分配主导航菜单" +msgstr "" + +#: inc/defaults.php:66 +msgid "工期取决于车型、施工部位、膜料和当日排期。隐形车衣与改色膜通常需要留车,隔热膜所需时间相对较短,具体以门店确认结果为准。" +msgstr "" + +#: inc/cpt.php:287 inc/customizer.php:57 inc/defaults.php:64 inc/helpers.php:65 page-faq.php:23 template-parts/home/faq.php:11 +msgid "常见问题" +msgstr "" + +#: inc/customizer.php:87 +msgid "常见问题标题" +msgstr "" + +#: inc/defaults.php:78 +msgid "建议准备车型与年份、想做的项目、外观偏好、预算范围和期望用车时间,便于门店更快判断可选方案。" +msgstr "" + +#: inc/cpt.php:93 +msgid "彩色改色膜" +msgstr "" + +#: footer.php:24 +msgid "快速导航" +msgstr "" + +#: inc/defaults.php:67 +msgid "怎样选择膜料和颜色?" +msgstr "" + +#: inc/helpers.php:50 +msgid "您好,我想咨询 %s 的贴膜服务。" +msgstr "" + +#: inc/helpers.php:51 +msgid "您好,我想咨询汽车贴膜服务。" +msgstr "" + +#: template-parts/home/cta.php:10 +msgid "想先了解适合哪种贴膜方案?" +msgstr "" + +#: inc/helpers.php:105 +msgid "手机端和桌面端导航目前只显示一个菜单项。请前往后台添加:首页、服务项目、案例作品、关于门店、常见问题、联系我们。" +msgstr "" + +#: header.php:32 +msgid "打开导航" +msgstr "" + +#: template-parts/home/service-teaser.php:23 +msgid "按车型与需求选择贴膜方案" +msgstr "" + +#: inc/defaults.php:30 +msgid "按车建议" +msgstr "" + +#: inc/defaults.php:39 +msgid "接车前检查车辆情况" +msgstr "" + +#: inc/customizer.php:108 +msgid "文档卡片 %d 描述" +msgstr "" + +#: inc/customizer.php:107 +msgid "文档卡片 %d 标题" +msgstr "" + +#: inc/customizer.php:56 +msgid "文档支持" +msgstr "" + +#: template-parts/home/hero.php:22 +msgid "方案确认" +msgstr "" + +#: inc/defaults.php:28 +msgid "方案透明" +msgstr "" + +#: template-parts/home/hero.php:23 +msgid "施工交付" +msgstr "" + +#: inc/defaults.php:75 +msgid "施工前可以先看样板效果吗?" +msgstr "" + +#: inc/defaults.php:38 +msgid "施工前确认项目与车辆情况,施工中保持沟通,交付时说明检查结果和日常护理事项。" +msgstr "" + +#: inc/defaults.php:40 +msgid "施工方案与费用先确认" +msgstr "" + +#: template-parts/home/video.php:11 +msgid "施工流程" +msgstr "" + +#: inc/defaults.php:36 +msgid "施工现场" +msgstr "" + +#: template-parts/home/case-teaser.php:19 +msgid "施工记录" +msgstr "" + +#: inc/cpt.php:249 +msgid "无法创建服务“%1$s”:%2$s" +msgstr "" + +#: inc/cpt.php:335 +msgid "无法创建页面“%1$s”:%2$s" +msgstr "" + +#: inc/cpt.php:207 +msgid "无法更新服务“%1$s”的默认文案:%2$s" +msgstr "" + +#: inc/cpt.php:306 +msgid "无法更新页面“%1$s”的模板:%2$s" +msgstr "" + +#: inc/defaults.php:61 +msgid "日常护理建议" +msgstr "" + +#: inc/customizer.php:86 +msgid "显示常见问题" +msgstr "" + +#: inc/customizer.php:83 +msgid "显示文档板块" +msgstr "" + +#: inc/customizer.php:78 +msgid "显示门店视频" +msgstr "" + +#: template-parts/home/hero.php:20 +msgid "服务步骤" +msgstr "" + +#: archive-service.php:22 archive-service.php:28 footer.php:26 inc/cpt.php:19 inc/cpt.php:20 inc/helpers.php:62 single-service.php:26 template-parts/home/service-teaser.php:22 +msgid "服务项目" +msgstr "" + +#: template-parts/content-none.php:9 +msgid "未找到内容" +msgstr "" + +#: inc/customizer.php:76 inc/customizer.php:84 +msgid "板块标题" +msgstr "" + +#: inc/customizer.php:85 +msgid "板块简介" +msgstr "" + +#: template-parts/home/service-teaser.php:49 +msgid "查看全部服务项目" +msgstr "" + +#: template-parts/home/case-teaser.php:36 +msgid "查看全部案例" +msgstr "" + +#: inc/defaults.php:49 +msgid "查看接车检查、车辆清洁、裁膜施工、复检交付等主要环节。" +msgstr "" + +#: inc/defaults.php:21 +msgid "根据车型与使用场景,选择更合适的汽车贴膜方案" +msgstr "" + +#: inc/cpt.php:40 +msgid "案例" +msgstr "" + +#: archive-case.php:22 archive-case.php:28 footer.php:27 inc/cpt.php:39 inc/helpers.php:63 single-case.php:23 +msgid "案例作品" +msgstr "" + +#: archive-case.php:65 template-parts/home/case-teaser.php:39 +msgid "案例内容正在整理中。" +msgstr "" + +#: inc/cpt.php:60 inc/cpt.php:61 +msgid "案例分类" +msgstr "" + +#: inc/defaults.php:35 +msgid "检查结果与护理事项讲清楚" +msgstr "" + +#: inc/customizer.php:72 +msgid "次按钮文字" +msgstr "" + +#: inc/customizer.php:73 +msgid "次按钮链接" +msgstr "" + +#: page-about.php:87 +msgid "欢迎到店查看实物色卡、膜料样板与施工环境,再结合车型和预算确认方案。" +msgstr "" + +#: inc/defaults.php:27 +msgid "每一步都讲清楚,再开始施工" +msgstr "" + +#: template-parts/home/video.php:11 +msgid "汽车贴膜施工流程示意图" +msgstr "" + +#: inc/helpers.php:56 +msgid "汽车贴膜服务咨询" +msgstr "" + +#: scripts/demo-content.php:102 +msgid "汽车贴膜维护说明" +msgstr "" + +#: archive-case.php:29 +msgid "浏览不同车型与项目的施工记录。实际效果会受膜料、车漆、光线和拍摄条件影响。" +msgstr "" + +#: inc/cpt.php:21 +msgid "添加服务项目" +msgstr "" + +#: inc/cpt.php:41 +msgid "添加案例" +msgstr "" + +#: scripts/demo-content.php:98 +msgid "用于本地冒烟和视觉回归的中性案例内容。" +msgstr "" + +#: inc/cpt.php:99 +msgid "用于车窗隔热与紫外线防护,可结合透光需求、隐私需求和法规要求选择适合的产品参数。" +msgstr "" + +#: scripts/demo-content.php:103 +msgid "用于验证主题普通文章模板的中性演示内容。" +msgstr "" + +#: page-contact.php:95 +msgid "电子邮箱" +msgstr "" + +#: inc/customizer.php:67 inc/customizer.php:75 +msgid "眉标" +msgstr "" + +#: inc/defaults.php:37 +msgid "看得见的施工过程" +msgstr "" + +#: inc/customizer.php:69 +msgid "简介文案" +msgstr "" + +#: inc/defaults.php:31 +msgid "结合车型与使用场景" +msgstr "" + +#: inc/customizer.php:47 +msgid "编辑固定布局的汽车贴膜门店首页。上线前请将所有演示文案替换为真实门店信息。" +msgstr "" + +#: inc/cpt.php:22 +msgid "编辑服务项目" +msgstr "" + +#: inc/cpt.php:42 +msgid "编辑案例" +msgstr "" + +#: inc/helpers.php:107 +msgid "编辑菜单" +msgstr "" + +#: header.php:42 +msgid "联系" +msgstr "" + +#: footer.php:29 inc/cpt.php:288 inc/helpers.php:66 page-contact.php:36 +msgid "联系我们" +msgstr "" + +#: inc/customizer.php:58 +msgid "联系方式与社交链接" +msgstr "" + +#: inc/customizer.php:96 page-contact.php:58 +msgid "联系电话" +msgstr "" + +#: inc/customizer.php:88 +msgid "联系邮箱" +msgstr "" + +#: archive-service.php:43 footer.php:33 inc/defaults.php:23 page-about.php:89 single-service.php:43 template-parts/home/cta.php:12 template-parts/home/service-teaser.php:39 +msgid "联系门店" +msgstr "" + +#: template-parts/home/video.php:11 +msgid "联系门店查看实拍" +msgstr "" + +#: page-contact.php:45 +msgid "联系门店,确认您的需求" +msgstr "" + +#: inc/defaults.php:41 +msgid "膜料与辅材分类管理" +msgstr "" + +#: inc/defaults.php:73 +msgid "膜料和颜色可以定制搭配吗?" +msgstr "" + +#: inc/customizer.php:97 page-contact.php:84 +msgid "营业时间" +msgstr "" + +#: template-parts/home/video.php:11 +msgid "观看门店视频" +msgstr "" + +#: inc/customizer.php:82 +msgid "视频封面图" +msgstr "" + +#: inc/customizer.php:80 +msgid "视频描述" +msgstr "" + +#: inc/customizer.php:79 +msgid "视频标题" +msgstr "" + +#: inc/defaults.php:58 +msgid "记录施工前车辆情况和交付检查结果。" +msgstr "" + +#: inc/defaults.php:56 +msgid "记录施工部位、所选膜料、费用和预计工期。" +msgstr "" + +#: inc/defaults.php:62 +msgid "说明洗车、清洁、检查等日常注意事项。" +msgstr "" + +#: template-parts/content-none.php:10 +msgid "请尝试其他搜索词或返回首页。" +msgstr "" + +#: inc/defaults.php:79 +msgid "质保范围和期限怎么确认?" +msgstr "" + +#: inc/defaults.php:80 +msgid "质保范围和期限由所选品牌、产品系列与施工项目决定。下单前请确认适用条件、起止时间和所需凭证,并以最终书面说明为准。" +msgstr "" + +#: inc/defaults.php:71 +msgid "贴膜后多久可以洗车?" +msgstr "" + +#: archive-service.php:40 template-parts/home/service-teaser.php:36 +msgid "贴膜服务" +msgstr "" + +#: header.php:17 +msgid "跳转到内容" +msgstr "" + +#: inc/cpt.php:90 +msgid "车漆保护 · 透明外观 · 日常养护" +msgstr "" + +#: inc/defaults.php:57 +msgid "车辆检查记录" +msgstr "" + +#: inc/defaults.php:32 +msgid "过程沟通" +msgstr "" + +#: 404.php:14 +msgid "返回首页" +msgstr "" + +#: inc/cpt.php:89 +msgid "透明保护膜覆盖车漆表面,可帮助降低日常轻微划痕、飞石和污渍对漆面的影响。具体性能取决于所选产品系列。" +msgstr "" + +#: inc/defaults.php:65 +msgid "通常需要多长时间?" +msgstr "" + +#: footer.php:35 +msgid "通过 WhatsApp 联系我们" +msgstr "" + +#: inc/cpt.php:94 +msgid "通过不同颜色和表面质感改变车辆外观,可根据车型、原车颜色和日常使用场景选择亮面、哑光等效果。" +msgstr "" + +#: inc/helpers.php:95 +msgid "配置菜单" +msgstr "" + +#: inc/customizer.php:105 +msgid "门店亮点 %d" +msgstr "" + +#: inc/customizer.php:106 +msgid "门店图片 %d" +msgstr "" + +#: inc/customizer.php:95 +msgid "门店地址" +msgstr "" + +#: template-parts/home/factory.php:13 +msgid "门店实景 %d" +msgstr "" + +#: inc/customizer.php:55 +msgid "门店环境与参观" +msgstr "" + +#: inc/customizer.php:77 +msgid "门店简介" +msgstr "" + +#: inc/customizer.php:46 +msgid "门店首页" +msgstr "" + +#: inc/customizer.php:111 +msgid "问题 %d" +msgstr "" + +#: inc/cpt.php:104 +msgid "陶瓷类隔热膜适合关注隔热表现和车内电子信号使用的车主,实际参数与适用位置以具体产品说明为准。" +msgstr "" + +#: inc/cpt.php:105 +msgid "陶瓷膜料 · 信号兼容 · 隔热方案" +msgstr "" + +#: inc/cpt.php:103 +msgid "陶瓷隔热膜" +msgstr "" + +#: inc/defaults.php:22 +msgid "隐形车衣、改色膜、隔热膜等项目,从需求沟通、膜料确认到施工交付,把选择和注意事项先讲清楚。" +msgstr "" + +#: inc/cpt.php:88 +msgid "隐形车衣(TPU 保护膜)" +msgstr "" + +#: inc/cpt.php:98 +msgid "隔热防爆膜" +msgstr "" + +#: inc/cpt.php:100 +msgid "隔热需求 · 紫外线防护 · 车窗适用" +msgstr "" + +#: template-parts/home/hero.php:21 +msgid "需求沟通" +msgstr "" + +#: footer.php:21 inc/defaults.php:20 +msgid "需求沟通 · 方案确认 · 施工交付" +msgstr "" + +#: template-parts/breadcrumb.php:18 +msgid "面包屑导航" +msgstr "" + +#: inc/cpt.php:109 +msgid "面向全景天窗的隔热保护项目,需要结合天窗结构、玻璃状况和所选膜料确认是否适合施工。" +msgstr "" + +#: inc/customizer.php:99 +msgid "页脚定位文案" +msgstr "" + +#: 404.php:12 +msgid "页面可能已迁移,请搜索网站或返回首页。" +msgstr "" + +#: template-parts/home/video.php:11 +msgid "页面图片为流程示意;门店实拍内容以实际上传为准。" +msgstr "" + +#: 404.php:11 +msgid "页面未找到" +msgstr "" + +#: footer.php:45 +msgid "项目、价格、工期与质保以门店最终确认为准。" +msgstr "" + +#: inc/defaults.php:29 +msgid "项目、膜料与费用先确认" +msgstr "" + +#: inc/defaults.php:55 +msgid "项目与费用确认" +msgstr "" + +#: inc/cpt.php:95 +msgid "颜色选择 · 表面质感 · 外观焕新" +msgstr "" + +#: inc/customizer.php:53 +msgid "首屏定位" +msgstr "" + +#: archive-case.php:21 archive-service.php:21 inc/cpt.php:285 inc/helpers.php:61 page-about.php:27 page-contact.php:35 page-faq.php:22 single-case.php:22 single-service.php:25 +msgid "首页" +msgstr "" diff --git a/page-about.php b/page-about.php index 99f748c..ef64c95 100644 --- a/page-about.php +++ b/page-about.php @@ -5,6 +5,10 @@ * * @package Fragrance_Trade */ +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + get_header(); ?> @@ -79,10 +83,10 @@ get_header(); ?>
-

-

+

+

- +
diff --git a/page-contact.php b/page-contact.php index c9bf263..eb19790 100644 --- a/page-contact.php +++ b/page-contact.php @@ -1,10 +1,14 @@
@@ -27,7 +33,7 @@ $map_nav_url = 'https://api.map.baidu.com/geocoder?address=' array( 'items' => array( array( 'label' => __( '首页', 'fragrance-trade' ), 'url' => home_url( '/' ) ), - array( 'label' => __( '预约联系', 'fragrance-trade' ), 'url' => null ), + array( 'label' => __( '联系我们', 'fragrance-trade' ), 'url' => null ), ), ) ); @@ -35,13 +41,13 @@ $map_nav_url = 'https://api.map.baidu.com/geocoder?address='
-

-

-

+

+

+

-
+
@@ -93,8 +99,9 @@ $map_nav_url = 'https://api.map.baidu.com/geocoder?address='
+ +
diff --git a/page-faq.php b/page-faq.php index d93ac47..d3227ab 100644 --- a/page-faq.php +++ b/page-faq.php @@ -5,6 +5,10 @@ * * @package Fragrance_Trade */ +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + get_header(); ?>
diff --git a/page.php b/page.php index 9f4213c..37648f1 100644 --- a/page.php +++ b/page.php @@ -1,5 +1,9 @@
diff --git a/screenshot.png b/screenshot.png index 2dcbaf0..1ebb977 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/single-case.php b/single-case.php index 8d063d8..a58639d 100644 --- a/single-case.php +++ b/single-case.php @@ -4,6 +4,10 @@ * * @package Fragrance_Trade */ +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + get_header(); ?>
@@ -35,7 +39,7 @@ get_header();
- +
diff --git a/single-service.php b/single-service.php index 4c8f1bd..4568844 100644 --- a/single-service.php +++ b/single-service.php @@ -4,13 +4,16 @@ * * @package Fragrance_Trade */ +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + get_header(); ?>
- <?php the_title_attribute(); ?> + + 'img-fluid rounded', 'decoding' => 'async' ) ); ?> + + <?php the_title_attribute(); ?> +

- +
diff --git a/single.php b/single.php index 56da7f1..de4e773 100644 --- a/single.php +++ b/single.php @@ -1,5 +1,9 @@
diff --git a/style.css b/style.css index 6589867..17da95b 100644 --- a/style.css +++ b/style.css @@ -1,12 +1,12 @@ /* Theme Name: B2B Trade -Theme URI: https://example.com/b2b-trade/ +Theme URI: http://git.xgouo.cn/zhs123/car-t-t Author: B2B Trade -Description: 专业汽车贴膜门店主题,支持服务项目展示、案例作品集、在线预约联系,适配移动端。 -Version: 2.0.0 -Requires at least: 6.5 -Tested up to: 6.6 -Requires PHP: 7.4 +Description: 专业汽车贴膜门店主题,支持服务项目、案例作品集、门店信息和直接联系,适配移动端。 +Version: 2.1.0 +Requires at least: 6.8 +Tested up to: 7.0 +Requires PHP: 8.1 License: GNU General Public License v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Text Domain: fragrance-trade diff --git a/template-parts/breadcrumb.php b/template-parts/breadcrumb.php index ff16f46..5b52302 100644 --- a/template-parts/breadcrumb.php +++ b/template-parts/breadcrumb.php @@ -6,6 +6,10 @@ * * @param array $items Array of ['label' => string, 'url' => string|null]. */ +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + if ( empty( $args['items'] ) || ! is_array( $args['items'] ) ) { return; diff --git a/template-parts/content-none.php b/template-parts/content-none.php index 45faba5..3905f7a 100644 --- a/template-parts/content-none.php +++ b/template-parts/content-none.php @@ -1,5 +1,9 @@

diff --git a/template-parts/content-page.php b/template-parts/content-page.php index e9e0a48..8b16460 100644 --- a/template-parts/content-page.php +++ b/template-parts/content-page.php @@ -1,3 +1,7 @@
>
diff --git a/template-parts/home/case-teaser.php b/template-parts/home/case-teaser.php index 54f6c54..baf42f6 100644 --- a/template-parts/home/case-teaser.php +++ b/template-parts/home/case-teaser.php @@ -1,18 +1,23 @@ 'case', 'posts_per_page' => 6, 'post_status' => 'publish', + 'no_found_rows' => true, ) ); ?>
-

-

+

+

have_posts() ) : ?>
@@ -21,7 +26,7 @@ $case_query = new WP_Query( 'img-fluid' ) ); ?> - <?php the_title_attribute(); ?> + <?php the_title_attribute(); ?> @@ -31,7 +36,7 @@ $case_query = new WP_Query(
-

+

diff --git a/template-parts/home/cta.php b/template-parts/home/cta.php index 80648ce..07333ff 100644 --- a/template-parts/home/cta.php +++ b/template-parts/home/cta.php @@ -1,10 +1,14 @@
-

-

- +

+

+
diff --git a/template-parts/home/documents.php b/template-parts/home/documents.php index 5f8a214..bc08fe6 100644 --- a/template-parts/home/documents.php +++ b/template-parts/home/documents.php @@ -1,4 +1,13 @@ - +
-

+

diff --git a/template-parts/home/factory.php b/template-parts/home/factory.php index 037ec92..cbcd4ab 100644 --- a/template-parts/home/factory.php +++ b/template-parts/home/factory.php @@ -1,5 +1,9 @@
diff --git a/template-parts/home/faq.php b/template-parts/home/faq.php index c2ab973..57636ef 100644 --- a/template-parts/home/faq.php +++ b/template-parts/home/faq.php @@ -1,2 +1,11 @@ - -

+ +

diff --git a/template-parts/home/hero.php b/template-parts/home/hero.php index de47e0c..b2dd5c8 100644 --- a/template-parts/home/hero.php +++ b/template-parts/home/hero.php @@ -1,5 +1,9 @@
@@ -10,13 +14,13 @@ $title = fragrance_trade_get_mod( 'b2b_hero_title' );

- - + +
-
    -
  • -
  • -
  • +
      +
    • +
    • +
diff --git a/template-parts/home/service-teaser.php b/template-parts/home/service-teaser.php index 41ae980..1bf3a61 100644 --- a/template-parts/home/service-teaser.php +++ b/template-parts/home/service-teaser.php @@ -1,10 +1,15 @@ 'service', 'posts_per_page' => 6, 'post_status' => 'publish', + 'no_found_rows' => true, ) ); if ( ! $service_query->have_posts() ) { @@ -15,24 +20,23 @@ if ( ! $service_query->have_posts() ) {

-

+

have_posts() ) : $service_query->the_post(); - $image = get_post_meta( get_the_ID(), '_service_image', true ); - $fallback = 'products/placeholder-0' . ( $count < 10 ? $count : 1 ) . '.svg'; - $img = $image ? $image : fragrance_trade_asset_uri( $fallback ); + $image = get_post_meta( get_the_ID(), '_service_image', true ); + $fallback = 'images/products/placeholder-0' . ( $count < 10 ? $count : 1 ) . '.svg'; ?> +

diff --git a/template-parts/home/video.php b/template-parts/home/video.php index f9e1748..ad872ff 100644 --- a/template-parts/home/video.php +++ b/template-parts/home/video.php @@ -1,9 +1,12 @@
-
<?php esc_attr_e( '汽车贴膜施工流程示意图', 'fragrance-trade' ); ?>

+
<?php esc_attr_e( '汽车贴膜施工流程示意图', 'fragrance-trade' ); ?>