refactor(settings): remove filing info config and readers

Drop the 备案信息 group (icp_filing, police_filing, footer_text) from the
global.common PHP/Vue schemas, the FacadeBulk readers and the
get_global_settings() payload. No frontend consumer existed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-28 18:36:27 +08:00
1 parent 32172582ff
commit 6da08d9d4f
5 files changed
+2 -63

No files matched your search

@@ -12,7 +12,7 @@ export const globalSection = {
label: '常用功能',
route: '/global/common',
title: '常用功能',
desc: '评论、性能、头像源与备案等全局基础配置。',
desc: '评论、性能、头像源等全局基础配置。',
canonicalDomain: 'global',
section: 'common',
}),
@@ -7,7 +7,7 @@ export const commonSchema = {
key: 'global.common',
title: '常用功能',
icon: 'fa fas fa-cog',
description: '管理站点常用开关、懒加载与备案信息等基础配置。',
description: '管理站点图像懒加载等常用基础配置。',
defaults: {
lazy_posts_thumb: true,
lazy_avatar: true,
@@ -18,9 +18,6 @@ export const commonSchema = {
lazy_other: true,
lazy_animation: 'blur',
thumbnail: defaultThumbnail,
icp_filing: '',
police_filing: '',
footer_text: '',
},
groups: [
{
@@ -56,15 +53,5 @@ export const commonSchema = {
{ key: 'lazy_other', label: '其它图片懒加载', type: 'switch', default: true },
],
},
{
key: 'filing',
title: '备案信息',
icon: 'fa fas fa-shield-alt',
fields: [
{ key: 'icp_filing', label: 'ICP 备案号', type: 'input', placeholder: '例如:京ICP备12345678号', help: '显示在页脚的备案信息' },
{ key: 'police_filing', label: '公安备案号', type: 'input', placeholder: '例如:公网安备11000000000000号', help: '显示在页脚的备案信息' },
{ key: 'footer_text', label: '页脚附加文字', type: 'input', placeholder: '自定义页脚文字', help: '显示在版权信息下方' },
],
},
],
}
-5
View File
@@ -35,11 +35,6 @@ class GlobalSchema {
]],
['key' => 'thumbnail', 'label' => '懒加载预载图', 'type' => 'media', 'default' => get_template_directory_uri() . '/assets/img/thumbnail.svg'],
]],
['key' => 'filing', 'title' => '备案信息', 'fields' => [
['key' => 'icp_filing', 'label' => 'ICP 备案号', 'type' => 'input', 'default' => ''],
['key' => 'police_filing', 'label' => '公安备案号', 'type' => 'input', 'default' => ''],
['key' => 'footer_text', 'label' => '页脚附加文字', 'type' => 'input', 'default' => ''],
]],
],
],
'logo' => [
-2
View File
@@ -154,8 +154,6 @@ trait DisplayPageGroups {
'logo_text' => self::logo_text(),
'logo_width' => self::logo_width(),
'site_favicon' => self::favicon_url(),
'icp_filing' => self::icp_filing(),
'footer_text' => self::footer_text(),
'theme_mode' => self::theme_mode(),
'theme_mode_button' => self::get_theme_mode_button_positions(),
'primary_color' => self::primary_color(),
-41
View File
@@ -199,47 +199,6 @@ trait FacadeBulk {
/**
* 获取备案配置。
* @return array {icp_enabled, icp_filing, police_enabled, police_filing}
*/
public static function get_filing_settings(): array {
$s = self::get_all();
$icp_enabled = !isset($s['footer_icp']) || !empty($s['footer_icp']);
$police_enabled = !isset($s['footer_police']) || !empty($s['footer_police']);
$icp_filing = trim((string) ($s['icp_filing'] ?? ''));
$police_filing = trim((string) ($s['police_filing'] ?? ''));
return [
'icp_enabled' => $icp_enabled,
'icp_filing' => $icp_filing,
'police_enabled' => $police_enabled,
'police_filing' => $police_filing,
];
}
/** 获取页脚附加文字 */
public static function footer_text(): string {
return trim((string) self::get_value('footer_text', ''));
}
/** 获取 ICP 备案号 */
public static function icp_filing(): string {
return trim((string) self::get_value('icp_filing', ''));
}
/** 获取公安备案号 */
public static function police_filing(): string {
return trim((string) self::get_value('police_filing', ''));
}
/** 获取导航 Logo 宽度 */
public static function logo_width(): int {
$width = (int) self::get_value('logo_width', 150);