chore(debug): 增加 ajax 调试工具定位 admin-ajax 400 "0" 来源

- assets/js/core/ajax-debug.js:ajaxSend 记录发往 admin-ajax 的
  action 与参数,ajaxError/fetch 记录失败请求的 url/status/响应
- inc/aksrt-ajax-debug.php:admin_init 时记录每个 admin-ajax 请求的
  action、是否有 wp_ajax_/wp_ajax_nopriv_ 处理器、POST 载荷至
  wp-content/aksrt-ajax-debug.log(handled=0 即 400 "0" 的来源)
- 开关:WP_DEBUG 或 URL 带 ?aksrt_ajax_debug=1(或常量 AKSRT_AJAX_DEBUG)
This commit is contained in:
2026-08-22 13:39:13 +08:00
parent 4d6fd641e5
commit 8d4f07656a
4 changed files with 167 additions and 0 deletions
+1
View File
@@ -12,6 +12,7 @@
defined('ABSPATH') || exit;
// Stage 1: helpers
require_once AKSRT_DIR . '/inc/aksrt-ajax-debug.php';
require_once AKSRT_DIR . '/inc/helpers/aksrt-icons.php';
require_once AKSRT_DIR . '/inc/helpers/aksrt-avatar.php';
require_once AKSRT_DIR . '/inc/helpers/aksrt-domain-model.php';