feat(branding): default the site icons to assets/img/favicon.png

- Point the 浏览器图标 / 移动端图标 schema defaults (PHP + VUE) at
  assets/img/favicon.png instead of an empty media field.
- Fall back to the same PNG in Settings::favicon_url() when no custom
  favicon and no native site_icon are configured.
- Add Settings::mobile_icon_url() and emit apple-touch-icon from SEOHead;
  the 移动端图标 field previously had no consumer and never reached the page.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Opus 5 committed 2026-11-05 17:00:50 +08:00
1 parent b56b9bbe37
commit 3ce5bfc20c
5 files changed
+27 -8

No files matched your search

+2 -2
View File
@@ -162,8 +162,8 @@ class GlobalSchema {
['key' => 'logo_text', 'label' => 'Logo 文字', 'type' => 'input', 'default' => ''],
]],
['key' => 'favicon', 'title' => '站点图标', 'fields' => [
['key' => 'site_favicon', 'label' => '浏览器图标', 'type' => 'media', 'default' => ''],
['key' => 'site_icon', 'label' => '移动端图标', 'type' => 'media', 'default' => ''],
['key' => 'site_favicon', 'label' => '浏览器图标', 'type' => 'media', 'default' => get_template_directory_uri() . '/assets/img/favicon.png'],
['key' => 'site_icon', 'label' => '移动端图标', 'type' => 'media', 'default' => get_template_directory_uri() . '/assets/img/favicon.png'],
]],
],
],