fix(admin): replicate reference front-submit settings page 1:1

- Rewrite post_list/submit schema (PHP + JS) with the reference theme's
  field set, order, defaults and dependencies; topics fields excluded
- Map PostDisplay::get_submit_settings() and the FrontSubmit runtime to
  the new keys without legacy fallback
- Guest submission follows the capability matrix; category required on
  submit; pay limits read from the cash/points fieldset
- Drop dead front_submit_* settings, template branches and JS config
- Add submit settings reference contract test
This commit is contained in:
2026-09-24 12:29:19 +08:00
parent ed71314986
commit 264f2c51b2
14 changed files with 354 additions and 292 deletions
-8
View File
@@ -26,13 +26,6 @@ if (empty($ctx['enabled'])) {
return;
}
// Guest without guest mode → login.
if (!empty($ctx['is_guest']) && empty($ctx['settings']['guest_enabled'])) {
$login = function_exists('aksrt_get_login_url') ? aksrt_get_login_url(get_permalink()) : wp_login_url(get_permalink());
wp_safe_redirect($login);
exit;
}
// Invalid edit id → strip.
if (!empty($_GET['edit']) && empty($ctx['edit_post'])) {
wp_safe_redirect(remove_query_arg('edit'));
@@ -103,7 +96,6 @@ if (file_exists($js)) {
],
'leaveWarning' => !empty($ctx['settings']['leave_warning']),
'imageUploadMultiple' => $image_upload_multiple,
'ai' => [
'available' => !empty($ctx['ai_available']),