更新天气接口为和风天气,移除天气城市与 API Key 配置,简化主题部署

This commit is contained in:
root
2026-03-21 18:14:06 +08:00
parent 3c38481573
commit 9ae29cbff0
4 changed files with 233 additions and 100 deletions

View File

@@ -239,27 +239,7 @@ function themeConfig($form) {
$form->addInput($blogSignageText);
$blogSignageText->setAttribute('class', 'setting-content my-3');
// 天气城市设置
$weatherCity = new Typecho_Widget_Helper_Form_Element_Text(
'weatherCity',
NULL,
'Beijing',
'天气城市(非必填)',
'介绍填写用于查询天气的城市名称例如北京或Beijing'
);
$form->addInput($weatherCity);
$weatherCity->setAttribute('class', 'setting-content my-3');
// 天气 API Key
$weatherApiKey = new Typecho_Widget_Helper_Form_Element_Text(
'weatherApiKey',
NULL,
NULL,
'天气 API Key非必填',
'介绍:在此填写 OpenWeatherMap 或其他天气接口的 API Key'
);
$form->addInput($weatherApiKey);
$weatherApiKey->setAttribute('class', 'setting-content my-3');
// (已移除天气配置)天气城市与 API Key/Host 已改为直接写入主题代码以便简化部署
// 首页内容显示
$indexBlock = new Typecho_Widget_Helper_Form_Element_Checkbox(