fix(admin): stop the ticket process form from white-screening on submit
The process form posted to admin-post.php without a hidden action field,
so no admin_post_{action} hook fired and WordPress returned a blank
page. Dispatch to aksrt_users_update_report / aksrt_users_process_appeal
per ticket kind, matching every other native form, and lock the contract
in the report test.
This commit is contained in:
@@ -162,6 +162,10 @@ test('native ban page mirrors the reference theme layout', () => {
|
||||
for (const label of [`__('立即处理', 'aksrt')`, `__('正在处理', 'aksrt')`, `__('被举报用户', 'aksrt')`, `__('被举报用户禁封信息', 'aksrt')`, `__('申诉用户', 'aksrt')`, `__('禁封信息', 'aksrt')`, `__('申诉信息', 'aksrt')`, `__('处理方式', 'aksrt')`, `__('处理留言', 'aksrt')`, `__('申诉通过(解封该用户)', 'aksrt')`, `__('申诉拒绝(保持原禁封状态)', 'aksrt')`, `__('此处内容会反馈给举报人', 'aksrt')`, `__('确认提交', 'aksrt')`, `__('用户状态正常', 'aksrt')`, `__('当前用户已解封', 'aksrt')`, `__('此用户已解封', 'aksrt')`, `__('暂无申请记录', 'aksrt')`]) {
|
||||
assert.ok(tickets.includes(label), `missing process form label: ${label}`)
|
||||
}
|
||||
// 处理表单必须携带隐藏 action 字段:admin-post.php 靠它触发
|
||||
// admin_post_{action} 钩子,缺失时 WordPress 不输出任何内容(白屏)。
|
||||
assert.match(tickets, /name="action" value="aksrt_users_update_report"/)
|
||||
assert.match(tickets, /name="action" value="aksrt_users_process_appeal"/)
|
||||
|
||||
// 分页对齐参考主题 zibpay_admin_pagenavi(每页 20 条)
|
||||
assert.match(tickets, /TICKETS_PER_PAGE = 20/)
|
||||
|
||||
Reference in New Issue
Block a user