From 7af137ae9129a189be0c61636f21020151848441 Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Mon, 26 Jan 2026 13:51:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20AI=20API=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8A=9F=E8=83=BD=E7=BC=BA=E5=B0=91=20nonce?= =?UTF-8?q?=20=E5=8F=82=E6=95=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在测试 API 的 AJAX 请求中添加 nonce 参数 - 使用 wp_create_nonce('argon_test_unified_api') 生成 nonce - 修复测试按钮点击后无法正常工作的问题 --- settings.php | 1 + tmp/analyze-settings.py | 21 -------- tmp/refactor-settings.py | 71 -------------------------- tmp/remove-duplicate-spam-detection.py | 30 ----------- 4 files changed, 1 insertion(+), 122 deletions(-) delete mode 100644 tmp/analyze-settings.py delete mode 100644 tmp/refactor-settings.py delete mode 100644 tmp/remove-duplicate-spam-detection.py diff --git a/settings.php b/settings.php index 5d3a8b9..de7c242 100644 --- a/settings.php +++ b/settings.php @@ -2448,6 +2448,7 @@ function themeoptions_page(){ $.post(ajaxurl, { action: 'argon_ajax_test_unified_api', + nonce: '', api_id: apiId }, function(response) { if (response.success) { diff --git a/tmp/analyze-settings.py b/tmp/analyze-settings.py deleted file mode 100644 index 25e6506..0000000 --- a/tmp/analyze-settings.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python3 -# 分析 settings.php 文件结构 - -with open('settings.php', 'r', encoding='utf-8') as f: - content = f.read() - -# 查找关键位置 -pos1 = content.find('