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:
@@ -175,8 +175,6 @@ if ($is_guest) {
|
||||
$submit_label = __('审核', 'aksrt');
|
||||
} elseif ($edit_post && in_array($post_status, ['publish', 'pending'], true)) {
|
||||
$submit_label = __('保存', 'aksrt');
|
||||
} elseif (($settings['review_mode'] ?? 'pending') === 'pending' && !$cap('new_post_audit_no')) {
|
||||
$submit_label = __('审核', 'aksrt');
|
||||
}
|
||||
|
||||
$ai_available = class_exists('\AKSRT\Ai\AI') && \AKSRT\Ai\AI::get_instance()->is_available();
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*/
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (empty($ctx['settings']['allow_cover'])) {
|
||||
return;
|
||||
}
|
||||
if (empty($ctx['can_cover_image']) && empty($ctx['can_cover_slide']) && empty($ctx['can_cover_video'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
/** @var array $ctx */
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$settings = $ctx['settings'];
|
||||
$is_can_new = !empty($ctx['is_can_new']);
|
||||
$status = (string) $ctx['post_status'];
|
||||
$can_draft = !empty($ctx['user_id'])
|
||||
&& empty($ctx['is_guest'])
|
||||
&& !empty($settings['draft_save'])
|
||||
&& !in_array($status, ['publish', 'pending'], true);
|
||||
?>
|
||||
<div class="zib-widget">
|
||||
|
||||
@@ -25,7 +25,6 @@ require_once get_template_directory() . '/templates/parts/submit/term-checks.php
|
||||
<div class="zib-widget mb10-sm">
|
||||
<div class="title-theme mb10"><?php esc_html_e('文章参数', 'aksrt'); ?></div>
|
||||
<div class="term-select-box">
|
||||
<?php if (!empty($settings['allow_category'])) : ?>
|
||||
<div class="newpost-cat-drop drop-select dropdown dependency-box">
|
||||
<button type="button" data-toggle-class="open" data-target=".newpost-cat-drop" class="flex ac jsb drop-btn form-control mb6">
|
||||
<span class="title-theme222"><i class="fa fas fa-folder-open mr6" aria-hidden="true"></i><?php esc_html_e('分类', 'aksrt'); ?></span><i class="ml6 fa fas fa-angle-right em12"></i>
|
||||
@@ -42,7 +41,6 @@ require_once get_template_directory() . '/templates/parts/submit/term-checks.php
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($settings['custom_filter_s']) && !empty($ctx['custom_dimensions'])) : ?>
|
||||
<?php foreach ($ctx['custom_dimensions'] as $dimension) :
|
||||
|
||||
Reference in New Issue
Block a user