feat(ux): forum pay-hide depth, clogin OAuth, ban appeals admin, posts-navs widget

- Forum compose/save/draft: VIP prices, partial hide, coupons + shortcode tools
- Rainbow clogin aggregate login (rewrite + schema + CLoginClient)
- Native ban appeals tab: approve/reject + lift ban + notify
- WidgetPostsNavs + register missing forum widgets
- Submit editor shortcodes: login/reply/vip/payshow
This commit is contained in:
kate522 committed 2026-07-18 23:31:57 +08:00
1 parent 25aabb71a3
commit 24330653f0
15 files changed
+834 -35

No files matched your search

+35 -1
View File
@@ -78,11 +78,33 @@ class DraftService {
}
if (isset($data['credits_cost'])) {
update_post_meta($post_id, '_aksrt_credits_cost', max(0, (int) $data['credits_cost']));
$cost = max(0, (int) $data['credits_cost']);
update_post_meta($post_id, '_aksrt_credits_cost', $cost);
update_post_meta($post_id, '_aksrt_pay_credits', $cost);
}
if (isset($data['pay_price'])) {
update_post_meta($post_id, '_aksrt_pay_price', sanitize_text_field((string) $data['pay_price']));
}
if (isset($data['credits_vip1']) && (string) $data['credits_vip1'] !== '') {
update_post_meta($post_id, '_aksrt_credits_vip1', max(0, (int) $data['credits_vip1']));
}
if (isset($data['credits_vip2']) && (string) $data['credits_vip2'] !== '') {
update_post_meta($post_id, '_aksrt_credits_vip2', max(0, (int) $data['credits_vip2']));
}
if (isset($data['pay_vip1_price']) && (string) $data['pay_vip1_price'] !== '') {
$v1 = max(0, (float) $data['pay_vip1_price']);
update_post_meta($post_id, '_aksrt_pay_vip1_price', $v1);
update_post_meta($post_id, '_aksrt_pay_vip_price', $v1);
}
if (isset($data['pay_vip2_price']) && (string) $data['pay_vip2_price'] !== '') {
update_post_meta($post_id, '_aksrt_pay_vip2_price', max(0, (float) $data['pay_vip2_price']));
}
if (array_key_exists('pay_hide_part', $data)) {
update_post_meta($post_id, '_aksrt_pay_hide_part', !empty($data['pay_hide_part']) ? 1 : 0);
}
if (array_key_exists('topic_coupon_s', $data)) {
update_post_meta($post_id, '_aksrt_topic_coupon_s', !empty($data['topic_coupon_s']) ? 1 : 0);
}
if (isset($data['visibility_roles']) && is_array($data['visibility_roles'])) {
update_post_meta($post_id, '_aksrt_visibility_roles', array_map('sanitize_key', $data['visibility_roles']));
}
@@ -236,6 +258,12 @@ class DraftService {
'featured_video' => get_post_meta($draft_id, '_aksrt_featured_video', true) ?: '',
'credits_cost' => (int) get_post_meta($draft_id, '_aksrt_credits_cost', true),
'pay_price' => get_post_meta($draft_id, '_aksrt_pay_price', true) ?: '',
'credits_vip1' => get_post_meta($draft_id, '_aksrt_credits_vip1', true),
'credits_vip2' => get_post_meta($draft_id, '_aksrt_credits_vip2', true),
'pay_vip1_price' => get_post_meta($draft_id, '_aksrt_pay_vip1_price', true),
'pay_vip2_price' => get_post_meta($draft_id, '_aksrt_pay_vip2_price', true),
'pay_hide_part' => (int) get_post_meta($draft_id, '_aksrt_pay_hide_part', true) === 1,
'topic_coupon_s' => (int) get_post_meta($draft_id, '_aksrt_topic_coupon_s', true) === 1,
'visibility_roles' => get_post_meta($draft_id, '_aksrt_visibility_roles', true) ?: [],
'topic_cat' => $topic_cat,
'vote_enabled' => get_post_meta($draft_id, '_aksrt_vote_enabled', true) === '1',
@@ -288,6 +316,12 @@ class DraftService {
'featured_video' => esc_url_raw((string) ($_POST['featured_video'] ?? '')),
'credits_cost' => (int) ($_POST['credits_cost'] ?? 0),
'pay_price' => sanitize_text_field((string) ($_POST['pay_price'] ?? '')),
'credits_vip1' => isset($_POST['credits_vip1']) ? sanitize_text_field((string) $_POST['credits_vip1']) : '',
'credits_vip2' => isset($_POST['credits_vip2']) ? sanitize_text_field((string) $_POST['credits_vip2']) : '',
'pay_vip1_price' => isset($_POST['pay_vip1_price']) ? sanitize_text_field((string) $_POST['pay_vip1_price']) : '',
'pay_vip2_price' => isset($_POST['pay_vip2_price']) ? sanitize_text_field((string) $_POST['pay_vip2_price']) : '',
'pay_hide_part' => !empty($_POST['pay_hide_part']),
'topic_coupon_s' => !empty($_POST['topic_coupon_s']),
'visibility_roles' => isset($_POST['visibility_roles']) && is_array($_POST['visibility_roles'])
? array_map('sanitize_key', $_POST['visibility_roles']) : [],
];